Skip to content

Commit 1f49a9c

Browse files
committed
fix static declarations
1 parent 9aec5ed commit 1f49a9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/parser/statement.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ module.exports = {
208208

209209
case this.tok.T_STATIC:
210210
var current = [this.token, this.lexer.getState()];
211-
var result = this.node('global');
211+
var result = this.node('static');
212212
if (this.next().token === this.tok.T_DOUBLE_COLON) {
213213
// static keyword for a class
214214
this.lexer.tokens.push(current);
@@ -225,7 +225,7 @@ module.exports = {
225225
return [name, value];
226226
}, ',');
227227
this.expectEndOfStatement();
228-
return result(items);
228+
return result('declare', items);
229229

230230
case this.tok.T_ECHO:
231231
var items = this.next().read_list(this.read_expr, ',');

0 commit comments

Comments
 (0)