From b6eb05a2622556c2bd7ef3f80930d80813d896ae Mon Sep 17 00:00:00 2001 From: Markus Felten Date: Mon, 16 Jan 2017 20:07:47 +0100 Subject: [PATCH] fix: explicitly list all used tokens in the grammar --- package.json | 2 +- src/grammar.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fc71a523..08b238df 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "homepage": "https://github.com/arlac77/config-expander#readme", "dependencies": { "expression-expander": "^5.3.7", - "pratt-parser": "^5.0.1" + "pratt-parser": "^6.0.0" }, "devDependencies": { "chai": "^3.5.0", diff --git a/src/grammar.js b/src/grammar.js index d8c29e81..0dcb4249 100644 --- a/src/grammar.js +++ b/src/grammar.js @@ -2,7 +2,7 @@ 'use strict'; import { - Parser, IdentifierToken + Parser, IdentifierToken, WhiteSpaceToken, NumberToken, StringToken } from 'pratt-parser'; @@ -101,6 +101,9 @@ export class ConfigParser extends Parser { const grammar = { tokens: [ + WhiteSpaceToken, + NumberToken, + StringToken, Object.create(IdentifierToken, { parseString: { value: function (tokenizer, pp, properties) {