diff 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
line wrap: on
line diff
--- a/testparse.js	Thu Apr 19 19:20:21 2012 -0700
+++ b/testparse.js	Sat Jul 07 16:48:36 2012 -0700
@@ -21,6 +21,17 @@
 			q('pre').innerHTML = e.message + '\nLine: ' + e.line + '\nCol: ' + e.column;
 		}*/
 	}
+	q('#toc').onclick = function() {
+		var text = q('textarea').value;
+		//try {
+			var parsed = parser.parse(text);
+			var c = parsed.toCModule();
+			setText(q('pre'), c);
+			console.log(parsed);
+		/*} catch(e) {
+			q('pre').innerHTML = e.message + '\nLine: ' + e.line + '\nCol: ' + e.column;
+		}*/
+	}
 	q('#run').onclick = function() {
 		var text = q('textarea').value;
 		//try {