diff --git a/src/parser.js b/src/parser.js index 6c872365..ec1d0313 100644 --- a/src/parser.js +++ b/src/parser.js @@ -260,6 +260,7 @@ class IdentElement extends Element { class NumberElement extends Element { constructor(value, startPos, endPos, line, error = null) { super('number', value, startPos, endPos, line, error); + value = String(value); this.isFloat = value.indexOf('.') !== -1; this.isNegative = value.startsWith('-'); }