Permalink
Browse files

Load the program source synchronously for now, and make the test java…

…script a bit more interesting
  • Loading branch information...
1 parent 781ee54 commit efa0139d82cfd4366935007bfd22d03b828f280e @leto committed Mar 26, 2011
Showing with 8 additions and 6 deletions.
  1. +5 −5 jaspers.js
  2. +3 −1 test.js
View
@@ -5,9 +5,9 @@ var source = "";
// Less Than Awesome
require('./lib/javascriptParser.js');
-fs.readFile('test.js', function (err, data) {
- if (err) throw err;
- source = data;
-});
+source = "" + fs.readFileSync('./test.js');
+
+var ast = jsParser.parse(source);
+console.dir(ast);
+
-jsParser.parse(source);
View
@@ -1 +1,3 @@
-2 + 3 ;
+var f = function() {
+ return 42;
+};

0 comments on commit efa0139

Please sign in to comment.