From ee9a05d3c4fbdcb34777ae75a9ae1499b1098add Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Tue, 22 Aug 2017 15:15:07 -0400 Subject: Change arithmetic lexing - Rename tokens from symbols ('+', '-'), to words - Differentiate between symbols with and without surrounding whitespace - Update parser to work with new token names --- __tests__/parser.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '__tests__/parser.test.js') diff --git a/__tests__/parser.test.js b/__tests__/parser.test.js index fb554f9..bc88894 100644 --- a/__tests__/parser.test.js +++ b/__tests__/parser.test.js @@ -152,8 +152,8 @@ describe('parse', () => { }) }) - test('2d(6+3)d4', () => { - expect(parse('2d(6+3)d4')).toEqual({ + test('2d(6 + 3)d4', () => { + expect(parse('2d(6 + 3)d4')).toEqual({ type: 'd', left: { type: 'constant', value: 2 }, right: { -- cgit v1.2.3