m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/__tests__/lexer.test.js
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-07-20 13:13:57 -0400
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2017-07-20 13:13:57 -0400
commit71a5cc94a1c0fe2ce035f9c0c26ee5df8bc2953b (patch)
tree3fb8703ef1c75ebcd92e3b7713382dfec9974d8e /__tests__/lexer.test.js
parent427149c9a4c4e0b389520d67199af01ad3c3f0c2 (diff)
Lex and parse keepHigh
Diffstat (limited to '__tests__/lexer.test.js')
-rw-r--r--__tests__/lexer.test.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/__tests__/lexer.test.js b/__tests__/lexer.test.js
index 3003fb9..04a95e1 100644
--- a/__tests__/lexer.test.js
+++ b/__tests__/lexer.test.js
@@ -136,4 +136,16 @@ describe('lex', () => {
])
})
})
+
+ describe('keep', () => {
+ test('1K2d20', () => {
+ expect(lex('1K2d20')).toEqual([
+ { type: 'constant', value: 1 },
+ { type: 'K' },
+ { type: 'constant', value: 2 },
+ { type: 'd' },
+ { type: 'constant', value: 20 }
+ ])
+ })
+ })
})