php-parser/test/code/parser/stmt/class/enum.test
2021-10-17 20:20:35 +02:00

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
)
)
)
)
)