fix: only traversal needs to be dependent of firstSymbol

This commit is contained in:
cha0s 2019-04-30 20:45:54 -05:00
parent b2d588f4e7
commit 3bf8dd44cc

View File

@ -95,7 +95,9 @@ export class TraversalCompiler {
let valueSymbol; let valueSymbol;
if (traversal.value) { if (traversal.value) {
valueSymbol = this.allocateItem(traversal.value); valueSymbol = this.allocateItem(traversal.value);
currentSymbol.dependencies.push(valueSymbol); if ('traversal' === traversal.value.constructor.type()) {
currentSymbol.dependencies.push(valueSymbol);
}
} }
// Allocate steps. // Allocate steps.
for (const i in rest) { for (const i in rest) {