-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Basic cases work. - Not working in the REPL yet, that's up next. - Adds a header file to the flex scanner gen. Removes the extra declarations in the parser spec.
- Loading branch information
1 parent
ab5382d
commit 98d0228
Showing
8 changed files
with
79 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
bin/flat | ||
y.* | ||
lex.yy.c | ||
lex.yy.? | ||
*.out | ||
tags | ||
*.o | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// test_eval.js | ||
// ------------ | ||
// Note the unfortunate limitation that until ASI is added, statements within | ||
// strings passed to eval need to be semicolon-terminated. | ||
|
||
(this.load || require)((this.load ? 'test' : '.') + '/tools/assertions.js'); | ||
|
||
|
||
test('eval without references', function() { | ||
assertEquals(1, eval('1;')); | ||
assertEquals(4, eval('2 + 2;')); | ||
assertEquals(42, eval('(function() { return 42; });')()); | ||
}); | ||
|
||
test('eval with references', function() { | ||
var x = 42; | ||
assertEquals(x, eval('x;')); | ||
assertEquals(f, eval('f;')); | ||
function f() { return 'The f function'; }; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters