mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-02 17:38:19 +01:00
4bfc4595ed
Fixes #807.
87 lines
1.6 KiB
Plaintext
87 lines
1.6 KiB
Plaintext
Enum
|
|
-----
|
|
<?php
|
|
|
|
enum A {
|
|
case class;
|
|
}
|
|
enum B implements Bar, Baz {
|
|
}
|
|
enum C: int implements Bar {
|
|
case Foo = 1;
|
|
}
|
|
-----
|
|
!!php7
|
|
array(
|
|
0: Stmt_Enum(
|
|
attrGroups: array(
|
|
)
|
|
name: Identifier(
|
|
name: A
|
|
)
|
|
scalarType: null
|
|
implements: array(
|
|
)
|
|
stmts: array(
|
|
0: Stmt_EnumCase(
|
|
attrGroups: array(
|
|
)
|
|
name: Identifier(
|
|
name: class
|
|
)
|
|
expr: null
|
|
)
|
|
)
|
|
)
|
|
1: Stmt_Enum(
|
|
attrGroups: array(
|
|
)
|
|
name: Identifier(
|
|
name: B
|
|
)
|
|
scalarType: null
|
|
implements: array(
|
|
0: Name(
|
|
parts: array(
|
|
0: Bar
|
|
)
|
|
)
|
|
1: Name(
|
|
parts: array(
|
|
0: Baz
|
|
)
|
|
)
|
|
)
|
|
stmts: array(
|
|
)
|
|
)
|
|
2: Stmt_Enum(
|
|
attrGroups: array(
|
|
)
|
|
name: Identifier(
|
|
name: C
|
|
)
|
|
scalarType: Identifier(
|
|
name: int
|
|
)
|
|
implements: array(
|
|
0: Name(
|
|
parts: array(
|
|
0: Bar
|
|
)
|
|
)
|
|
)
|
|
stmts: array(
|
|
0: Stmt_EnumCase(
|
|
attrGroups: array(
|
|
)
|
|
name: Identifier(
|
|
name: Foo
|
|
)
|
|
expr: Scalar_LNumber(
|
|
value: 1
|
|
)
|
|
)
|
|
)
|
|
)
|
|
) |