ast folding
This commit is contained in:
@@ -24,8 +24,10 @@ function use_basic(path) {
|
||||
|
||||
var tok_path = core_path + "/tokenize.cm"
|
||||
var par_path = core_path + "/parse.cm"
|
||||
var fold_path = core_path + "/fold.cm"
|
||||
var tokenize_mod = mach_eval("tokenize", text(fd.slurp(tok_path)), {use: use_basic})
|
||||
var parse_mod = mach_eval("parse", text(fd.slurp(par_path)), {use: use_basic})
|
||||
var fold_mod = mach_eval("fold", text(fd.slurp(fold_path)), {use: use_basic})
|
||||
|
||||
// Optionally load mcode compiler module
|
||||
var mcode_mod = null
|
||||
@@ -66,6 +68,7 @@ function analyze(src, filename) {
|
||||
}
|
||||
disrupt
|
||||
}
|
||||
ast = fold_mod(ast)
|
||||
return ast
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user