mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-11 08:39:44 +01:00
4c22c62783
Adds support for PHP 8 attributes, represented using `AttrGroup` nodes containing `Attribute` nodes. The `attrGroup` subnode is added to all nodes that can have attributes. This is still missing FPPP support. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
42 lines
905 B
Plaintext
42 lines
905 B
Plaintext
Comment at end of class (#509)
|
|
-----
|
|
<?php
|
|
class MyClass {
|
|
protected $a;
|
|
// my comment
|
|
}
|
|
-----
|
|
array(
|
|
0: Stmt_Class(
|
|
attrGroups: array(
|
|
)
|
|
flags: 0
|
|
name: Identifier(
|
|
name: MyClass
|
|
)
|
|
extends: null
|
|
implements: array(
|
|
)
|
|
stmts: array(
|
|
0: Stmt_Property(
|
|
attrGroups: array(
|
|
)
|
|
flags: MODIFIER_PROTECTED (2)
|
|
type: null
|
|
props: array(
|
|
0: Stmt_PropertyProperty(
|
|
name: VarLikeIdentifier(
|
|
name: a
|
|
)
|
|
default: null
|
|
)
|
|
)
|
|
)
|
|
1: Stmt_Nop(
|
|
comments: array(
|
|
0: // my comment
|
|
)
|
|
)
|
|
)
|
|
)
|
|
) |