diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2017-08-23 21:30:01 -0400 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2017-08-23 21:30:01 -0400 |
commit | fe1bb829ba1feeb4d8f384afe0ed62669d82407f (patch) | |
tree | 667520ac5019a24398255086d34460517421b8c8 /src | |
parent | 5bb027bde84e0a8fdb01bfa680b511ad842498ef (diff) |
Lex and parse threshold
Diffstat (limited to 'src')
-rw-r--r-- | src/lexer.js | 1 | ||||
-rw-r--r-- | src/parser.js | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/lexer.js b/src/lexer.js index a83ee2b..f316147 100644 --- a/src/lexer.js +++ b/src/lexer.js @@ -26,6 +26,7 @@ newLexemeType('E', 'E') newLexemeType('K', 'K') newLexemeType('k', 'k') newLexemeType('A', 'A') +newLexemeType('T', 'T') const lex = (expressionString) => { let lexemes = [] diff --git a/src/parser.js b/src/parser.js index 1b678e4..0201d05 100644 --- a/src/parser.js +++ b/src/parser.js @@ -64,6 +64,7 @@ newDieOperation('E') newDieOperation('K') newDieOperation('k') newDieOperation('A') +newDieOperation('T') newInfix('bigPlus', 20, { type: 'add' }) newInfix('bigMinus', 20, { type: 'subtract' }) |