m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-08-22 17:03:45 -0400
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-08-22 17:03:45 -0400
commit594f3b0c20c5b12f0d1ef11705187c22c1e40faf (patch)
tree480a141c74304ba3a49f86c44a84d28f82dfd7eb /src
parent1ae29437d03ea010da1b87dc12fd155d414e9c1f (diff)
Lex and parse keepLow
Diffstat (limited to 'src')
-rw-r--r--src/lexer.js1
-rw-r--r--src/parser.js1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/lexer.js b/src/lexer.js
index 2b3b25a..b95ebc5 100644
--- a/src/lexer.js
+++ b/src/lexer.js
@@ -24,6 +24,7 @@ newLexemeType('(', '\\(')
newLexemeType(')', '\\)')
newLexemeType('E', 'E')
newLexemeType('K', 'K')
+newLexemeType('k', 'k')
const lex = (expressionString) => {
let lexemes = []
diff --git a/src/parser.js b/src/parser.js
index c55fee6..48de2ab 100644
--- a/src/parser.js
+++ b/src/parser.js
@@ -62,6 +62,7 @@ newSymbol('d', (parser) => {
})
newDieOperation('E')
newDieOperation('K')
+newDieOperation('k')
newInfix('bigPlus', 20, { type: 'add' })
newInfix('plus', 20, { type: 'bonusAdd' })