aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorCamil Staps2017-03-18 16:06:01 +0100
committerCamil Staps2017-03-18 16:06:01 +0100
commit4dbdb3bf8ee0fbaaf316ca05fe0f084202d21d0c (patch)
tree17a1d8aae65e1ea2a97a1fb78d2dc26633d97f7c /frontend
parentTuple constructors (resolves #2) (diff)
More logical file name passing
Diffstat (limited to 'frontend')
-rw-r--r--frontend/parse.icl5
-rw-r--r--frontend/scanner.dcl2
-rw-r--r--frontend/scanner.icl8
3 files changed, 7 insertions, 8 deletions
diff --git a/frontend/parse.icl b/frontend/parse.icl
index 85e3364..2776d36 100644
--- a/frontend/parse.icl
+++ b/frontend/parse.icl
@@ -274,14 +274,13 @@ cWantDclFile :== False
wantModule :: !*File !{#Char} !Bool !Ident !Position !Bool !*HashTable !*File !*Files
-> (!Bool,!Bool,!ParsedModule, !*HashTable, !*File, !*Files)
wantModule file modification_time iclmodule file_id=:{id_name} import_file_position support_generics hash_table error files
- # scanState = openScanner file id_name file_name_extension
+ # scanState = openScanner file file_name
# hash_table=set_hte_mark (if iclmodule 1 0) hash_table
# (ok,dynamic_type_used,mod,hash_table,file,files) = initModule file_name modification_time scanState hash_table error files
hash_table=set_hte_mark 0 hash_table
= (ok,dynamic_type_used,mod,hash_table,file,files)
where
- file_name = id_name +++ file_name_extension
- file_name_extension = if iclmodule ".icl" ".dcl"
+ file_name = id_name +++ if iclmodule ".icl" ".dcl"
initModule :: String String ScanState !*HashTable !*File *Files
-> (!Bool,!Bool,!ParsedModule,!*HashTable,!*File,!*Files)
diff --git a/frontend/scanner.dcl b/frontend/scanner.dcl
index 69a5936..fc94622 100644
--- a/frontend/scanner.dcl
+++ b/frontend/scanner.dcl
@@ -151,7 +151,7 @@ instance getPosition ScanState
fopenInSearchPaths :: !{#Char} !{#Char} !SearchPaths !Int (ModTimeFunction *Files) !*Files -> (Optional (*File, {#Char}, {#Char}),!*Files)
-openScanner :: !*File !String !String -> ScanState
+openScanner :: !*File !String -> ScanState
closeScanner :: !ScanState !*Files -> *Files
setUseLayout :: !Bool !ScanState -> ScanState
diff --git a/frontend/scanner.icl b/frontend/scanner.icl
index fbd52c9..2739ea8 100644
--- a/frontend/scanner.icl
+++ b/frontend/scanner.icl
@@ -1631,12 +1631,12 @@ where
toString RightAssoc = "infixr "
toString NoAssoc = "infix "
-openScanner :: !*File !String !String -> ScanState
-openScanner file file_name file_name_extension
+openScanner :: !*File !String -> ScanState
+openScanner file file_name
= ScanState { ss_input = Input
{ inp_stream = InFile file
- , inp_filename = file_name +++ file_name_extension
- , inp_pos = {fp_line = 1, fp_col = 0}
+ , inp_filename = file_name
+ , inp_pos = {fp_line = 1, fp_col = 0}
, inp_tabsize = 4
}
, ss_offsides = [(1,False)] // to generate offsides between global definitions