From 9ff9fca1e97ec142f008e79bc4cca66de5a355b4 Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 15 Apr 2019 22:58:27 -0500 Subject: [PATCH] fix: allocating literals would fail on strings --- packages/behavior/context/traversal-compiler.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/behavior/context/traversal-compiler.js b/packages/behavior/context/traversal-compiler.js index 8f0a10e..5b5f68a 100644 --- a/packages/behavior/context/traversal-compiler.js +++ b/packages/behavior/context/traversal-compiler.js @@ -41,16 +41,12 @@ export class TraversalCompiler { this.traversal = traversal; } - allocateLiteral(literal) { - return this.allocateSymbol(JSON.stringify(literal.value)); - } - allocateItem(item) { switch (item.constructor.type()) { case 'traversal': return this.allocateTraversal(item); case 'literal': - return new Symbol(item.value); + return new Symbol(JSON.stringify(item.value)); } }