Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Commit 608b66e

Browse files
committed
1 parent 5b205cd commit 608b66e

17 files changed

+1312
-1067
lines changed

src/parser/statement.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,10 @@ module.exports = {
360360

361361
// default fallback expr / T_STRING '::' (etc...)
362362
this.lexer.tokens.push(current);
363+
const statement = this.node("expressionstatement");
363364
const expr = this.next().read_expr();
364-
this.expectEndOfStatement();
365-
return expr;
365+
this.expectEndOfStatement(expr);
366+
return statement(expr);
366367
}
367368

368369
case this.tok.T_GOTO: {

test/debug.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
*/
1717
const parser = require("../src/index");
1818
const ast = parser.parseEval(`
19-
self();
20-
paRenT();
19+
call();
20+
Foo::$var;
2121
`, {
2222
parser: {
2323
debug: true

0 commit comments

Comments
 (0)