# HG changeset patch # User Mike Pavone # Date 1375773442 25200 # Node ID 5e34563f90ae18b545229c14f274092e2cca2d62 # Parent 2b25d0ce2946bb50b7232b071130c8b044b19f64 Get javascript backend working from the command line compiler again diff -r 2b25d0ce2946 -r 5e34563f90ae tpc.js --- a/tpc.js Tue Aug 06 00:06:41 2013 -0700 +++ b/tpc.js Tue Aug 06 00:17:22 2013 -0700 @@ -1,4 +1,5 @@ var module = {exports: {}}; +var console = {log: function(text){}}; var PEG; var file = null; @@ -64,7 +65,7 @@ debugprint('//parsing', filename); var text = read(filename); try { - var parsed = parser.parse(text); + var parsed = parser.parse(text); } catch (error) { print('SyntaxError on at', error.line, ',', error.column, ':', error.message); var lines = text.split('\n'); @@ -86,7 +87,7 @@ function compileFile(filename, basedir, includes, debugmode, backend) { - + load(basedir + 'mquery.js'); load(basedir + 'peg.js'); PEG = module.exports; load(basedir + 'parser.js'); @@ -96,7 +97,7 @@ } else { load(basedir + 'jsbackend.js'); } - + var parsed = parseFile(filename); if (debugmode) { debugprint = print;