comparison testparse.js @ 31:668f533e5284

Add initial version of C backend
author Mike Pavone <pavone@retrodev.com>
date Sat, 07 Jul 2012 16:48:36 -0700
parents 04ae32e91598
children
comparison
equal deleted inserted replaced
30:608eb70fe261 31:668f533e5284
19 console.log(parsed); 19 console.log(parsed);
20 /*} catch(e) { 20 /*} catch(e) {
21 q('pre').innerHTML = e.message + '\nLine: ' + e.line + '\nCol: ' + e.column; 21 q('pre').innerHTML = e.message + '\nLine: ' + e.line + '\nCol: ' + e.column;
22 }*/ 22 }*/
23 } 23 }
24 q('#toc').onclick = function() {
25 var text = q('textarea').value;
26 //try {
27 var parsed = parser.parse(text);
28 var c = parsed.toCModule();
29 setText(q('pre'), c);
30 console.log(parsed);
31 /*} catch(e) {
32 q('pre').innerHTML = e.message + '\nLine: ' + e.line + '\nCol: ' + e.column;
33 }*/
34 }
24 q('#run').onclick = function() { 35 q('#run').onclick = function() {
25 var text = q('textarea').value; 36 var text = q('textarea').value;
26 //try { 37 //try {
27 var parsed = parser.parse(text); 38 var parsed = parser.parse(text);
28 var js = parsed.toJSModule(); 39 var js = parsed.toJSModule();