Skip to content

Commit 4ad9385

Browse files
committed
final + abstract
1 parent 17f7d7d commit 4ad9385

File tree

5 files changed

+571
-209
lines changed

5 files changed

+571
-209
lines changed

src/ast/propertyhook.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const KIND = "propertyhook";
1515
* @memberOf module:php-parser
1616
* @extends {Statement}
1717
* @property {string} name
18+
* @property {Boolean} isFinal
1819
* @property {Boolean} byref
1920
* @property {Parameter|null} parameter
2021
* @property {Block|Statement} body

src/ast/propertystatement.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ PropertyStatement.prototype.parseFlags = function (flags) {
5252
}
5353

5454
this.isStatic = flags[1] === 1;
55+
this.isAbstract = flags[2] === 1;
56+
this.isFinal = flags[2] === 2;
5557
};
5658

5759
module.exports = PropertyStatement;

src/parser/class.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,12 @@ module.exports = {
286286

287287
let parameter = null;
288288
let body = null;
289-
this.expect([this.tok.T_DOUBLE_ARROW, "{", "("]);
289+
this.expect([this.tok.T_DOUBLE_ARROW, "{", "(", ";"]);
290+
291+
// interface or abstract definition
292+
if (this.token === ";") {
293+
this.next();
294+
}
290295

291296
if (this.token === "(") {
292297
this.next();

0 commit comments

Comments
 (0)