Commit 9d14fbca authored by John van Groningen's avatar John van Groningen

also scan hierarchical module names (with .) in functions ScanImport and ScanFrom

parent 1e0aa2e1
implementation module PmParse
// Clean syntax dependant parsing
// Clean syntax dependent parsing
import StdClass,StdString,StdInt,StdChar,StdBool,StdMisc,StdFile,StdArray
import StdList, StdMaybe
......@@ -698,7 +698,7 @@ braces_sym sym nesting imp cleanid imports input
ScanFrom :: !(List String) !(Input a) -> (!Input a, !Symbol, !List String) | ScanInput a;
ScanFrom imports input
# (input`,sym,_,_) = ScanInput input;
# (input`,sym,_,_) = scan_module_symbol_from_input input;
| IdentSymId sym.repr
= ScanFromIdent (sym.string :! imports) input`;
= (input`,sym, imports);
......@@ -717,13 +717,13 @@ where
ScanImport :: !(List String) !(Input a) -> (!Input a, !Symbol, !List String) | ScanInput a;
ScanImport imports input
# (input`,sym,_,_) = ScanInput input;
# (input`,sym,_,_) = scan_module_symbol_from_input input;
| IdentSymId sym.repr = ScanImportComma (sym.string :! imports) input`;
= (input`,sym, imports);
where
ScanImportComma :: !(List String) !(Input a) -> (!Input a, !Symbol, !List String) | ScanInput a;
ScanImportComma imports input
# (input`,sym,_,_) = ScanInput input;
# (input`,sym,_,_) = scan_module_symbol_from_input input;
| CommaSymId sym.repr = ScanImport imports input`;
= (input`,sym, imports);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment