-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser at 70%, added ternary/logical/bitwise tests
- Loading branch information
1 parent
e9b4178
commit 4ad96ad
Showing
6 changed files
with
347 additions
and
8 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
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,12 @@ | ||
var Node = require('./Node') | ||
|
||
function AssignmentNode (name, expr) { | ||
this.name = name | ||
this.expr = expr | ||
} | ||
|
||
AssignmentNode.prototype = Object.create(Node.prototype) | ||
|
||
AssignmentNode.prototype.type = 'AssignmentNode' | ||
|
||
module.exports = AssignmentNode |
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,13 @@ | ||
var Node = require('./Node') | ||
|
||
function TernaryNode (predicate, truthy, falsy) { | ||
this.condition = predicate | ||
this.trueExpr = truthy | ||
this.falseExpr = falsy | ||
} | ||
|
||
TernaryNode.prototype = Object.create(Node.prototype) | ||
|
||
TernaryNode.prototype.type = 'TernaryNode' | ||
|
||
module.exports = TernaryNode |
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
Oops, something went wrong.