Mercurial > repos > tabletprog
diff tpc.js @ 207:60eff5f81d9a
Basic implementation of macros is now working
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 19 Nov 2013 22:02:11 -0800 |
parents | 6fe9343b1400 |
children | 2dac67e9d18b |
line wrap: on
line diff
--- a/tpc.js Wed Oct 23 19:10:03 2013 -0700 +++ b/tpc.js Tue Nov 19 22:02:11 2013 -0800 @@ -92,6 +92,7 @@ PEG = module.exports; load(basedir + 'parser.js'); load(basedir + 'compiler.js'); + load(basedir + 'interp.js'); if (backend == 'C') { load(basedir + 'cbackend.js'); } else if (backend == 'IL') { @@ -104,6 +105,7 @@ if (debugmode) { debugprint = print; } + parsed = parsed.macroexpand(new topenv(includes)); toplevel = new topsymbols(includes); switch(backend) {