Skip to content

Commit

Permalink
Merge fcbe56e into 6e63a00
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi committed Aug 27, 2019
2 parents 6e63a00 + fcbe56e commit 5d8a545
Show file tree
Hide file tree
Showing 10 changed files with 934 additions and 23 deletions.
9 changes: 3 additions & 6 deletions src/ast.js
Expand Up @@ -323,18 +323,15 @@ AST.prototype.resolvePrecedence = function(result, parser) {
result = buffer;
}
}
} else if (
result.kind === "silent" &&
!result.expr.parenthesizedExpression
) {
if (result.expr.kind === 'assign') return result;
} else if (result.kind === "silent" && !result.expr.parenthesizedExpression) {
if (result.expr.kind === "assign") return result;
// overall least precedence
if (result.expr.right) {
buffer = result.expr;
result.expr = buffer.left;
buffer.left = result;
this.swapLocations(buffer, buffer.left, buffer.right, parser);
result = buffer;
result = buffer;
}
}
return result;
Expand Down
4 changes: 2 additions & 2 deletions src/parser/scalar.js
Expand Up @@ -96,11 +96,11 @@ module.exports = {
value = value.substring(0, value.length - 1);
}
this.expect(this.tok.T_ENCAPSED_AND_WHITESPACE) && this.next();
this.expect(this.tok.T_END_HEREDOC) && this.next();
const raw = this.lexer._input.substring(
start,
this.lexer.yylloc.last_offset
this.lexer.yylloc.first_offset
);
this.expect(this.tok.T_END_HEREDOC) && this.next();
node = node(
value,
raw,
Expand Down
9 changes: 0 additions & 9 deletions test/snapshot/__snapshots__/acid.test.js.snap
Expand Up @@ -7565,15 +7565,6 @@ BAR",
"raw": "<<<'BAR'
$foo + $bar
BAR
));
eval(<<<FOO
return 'This is madness!';
FOO
);
}
__halt_compiler();
THE END ...
",
"value": " $foo + $bar",
},
Expand Down

0 comments on commit 5d8a545

Please sign in to comment.