diff options
author | johnvg | 2012-08-02 11:08:38 +0000 |
---|---|---|
committer | johnvg | 2012-08-02 11:08:38 +0000 |
commit | 6fefdc2bdbf518c1c22f6a130bb803abe9f174d7 (patch) | |
tree | 2d495b0532246eab6870886d84f03907531f8bae /frontend/postparse.icl | |
parent | optimize is constructor functions (diff) |
add pattern match test using =: in expressions,
add constructors PE_Matches and IsConstructor in module syntax
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2130 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/postparse.icl')
-rw-r--r-- | frontend/postparse.icl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/frontend/postparse.icl b/frontend/postparse.icl index 1e38490..c384ca8 100644 --- a/frontend/postparse.icl +++ b/frontend/postparse.icl @@ -35,7 +35,7 @@ exprToExprWithLocalDefs expr , ewl_locals = LocalParsedDefs [] , ewl_position= NoPos } - + prefixAndPositionToIdent :: !String !LineAndColumn !*CollectAdmin -> (!Ident, !*CollectAdmin) prefixAndPositionToIdent prefix {lc_line, lc_column} ca=:{ca_hash_table} # ({boxed_ident=ident}, ca_hash_table) = putIdentInHashTable (prefix +++ ";" +++ toString lc_line +++ ";" +++ toString lc_column) IC_Expression ca_hash_table @@ -159,6 +159,9 @@ where = collectFunctions (transformSequence sequence) icl_module ca collectFunctions (PE_ArrayDenot array_kind exprs) icl_module ca = collectFunctions (transformArrayDenot array_kind exprs) icl_module ca + collectFunctions (PE_Matches case_ident expr pattern position) icl_module ca + # (expr, ca) = collectFunctions expr icl_module ca + = (PE_Matches case_ident expr pattern position, ca) collectFunctions (PE_Dynamic exprs opt_dyn_type) icl_module ca # (exprs, ca) = collectFunctions exprs icl_module ca = (PE_Dynamic exprs opt_dyn_type, ca) @@ -1099,13 +1102,13 @@ scanModule mod=:{mod_ident,mod_type,mod_defs = pdefs} cached_modules support_gen def_macro_indices = macro_range }} hash_table = set_hte_mark 0 ca_hash_table - + fun_defs = fun_defs++reverse ca_rev_fun_defs fun_range = {ir_from=0,ir_to=n_global_functions} = (reorganise_icl_ok && pea_ok && import_dcl_ok && import_dcls_ok, mod, fun_range, fun_defs, optional_dcl_mod, modules, dcl_module_n,hash_table, err_file, files) where - scan_main_dcl_module :: Ident ModuleKind (ModTimeFunction *Files) *Files *CollectAdmin -> (!Bool,!Optional (Module (CollectedDefinitions (ScannedInstanceAndMembersR FunDef))),!Int,![ScannedModule],![Ident],!*Files,!*CollectAdmin) + scan_main_dcl_module :: Ident ModuleKind (ModTimeFunction *Files) *Files *CollectAdmin -> (!Bool,!Optional ScannedModule,!Int,![ScannedModule],![Ident],!*Files,!*CollectAdmin) scan_main_dcl_module mod_ident MK_Main _ files ca = (True, No,NoIndex,[MakeEmptyModule mod_ident MK_NoMainDcl], cached_modules,files, ca) scan_main_dcl_module mod_ident MK_None _ files ca |