diff options
author | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2017-08-22 15:19:12 -0400 |
---|---|---|
committer | Marcin Chrzanowski <marcin.j.chrzanowski@gmail.com> | 2017-08-22 15:19:12 -0400 |
commit | b84fe7672ad62a7e507b10704fbbd216afaaff44 (patch) | |
tree | 934b69b60432bc9ced9f8219c28f58b05d9ab1ed /src | |
parent | ee9a05d3c4fbdcb34777ae75a9ae1499b1098add (diff) |
Stop ignoring whitespace
Diffstat (limited to 'src')
-rw-r--r-- | src/lexer.js | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/lexer.js b/src/lexer.js index 5831541..8635e4a 100644 --- a/src/lexer.js +++ b/src/lexer.js @@ -14,10 +14,6 @@ const newValueLexeme = (type, regex, converter = v => v) => { }) } -const newSkippableLexeme = (type, regex) => { - newLexemeType(type, regex, () => {}) -} - newValueLexeme('constant', '\\d+', Number) newLexemeType('d', 'd') newLexemeType('bigPlus', ' \\+ ' ) @@ -27,7 +23,6 @@ newLexemeType('(', '\\(') newLexemeType(')', '\\)') newLexemeType('E', 'E') newLexemeType('K', 'K') -newSkippableLexeme('whitespace', '\\s+') const lex = (expressionString) => { let lexemes = [] |