mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2025-01-10 22:58:53 +01:00
67 lines
1.4 KiB
Plaintext
67 lines
1.4 KiB
Plaintext
|
Enum
|
||
|
-----
|
||
|
<?php
|
||
|
|
||
|
enum Suit: string
|
||
|
{
|
||
|
case Hearts = 'H';
|
||
|
case Diamonds;
|
||
|
case Clubs = 'C';
|
||
|
case Spades = 'S';
|
||
|
}
|
||
|
-----
|
||
|
!!php7
|
||
|
array(
|
||
|
0: Stmt_Enum(
|
||
|
attrGroups: array(
|
||
|
)
|
||
|
name: Identifier(
|
||
|
name: Suit
|
||
|
)
|
||
|
scalarType: Identifier(
|
||
|
name: string
|
||
|
)
|
||
|
implements: array(
|
||
|
)
|
||
|
stmts: array(
|
||
|
0: Stmt_EnumCase(
|
||
|
attrGroups: array(
|
||
|
)
|
||
|
name: Identifier(
|
||
|
name: Hearts
|
||
|
)
|
||
|
expr: Scalar_String(
|
||
|
value: H
|
||
|
)
|
||
|
)
|
||
|
1: Stmt_EnumCase(
|
||
|
attrGroups: array(
|
||
|
)
|
||
|
name: Identifier(
|
||
|
name: Diamonds
|
||
|
)
|
||
|
expr: null
|
||
|
)
|
||
|
2: Stmt_EnumCase(
|
||
|
attrGroups: array(
|
||
|
)
|
||
|
name: Identifier(
|
||
|
name: Clubs
|
||
|
)
|
||
|
expr: Scalar_String(
|
||
|
value: C
|
||
|
)
|
||
|
)
|
||
|
3: Stmt_EnumCase(
|
||
|
attrGroups: array(
|
||
|
)
|
||
|
name: Identifier(
|
||
|
name: Spades
|
||
|
)
|
||
|
expr: Scalar_String(
|
||
|
value: S
|
||
|
)
|
||
|
)
|
||
|
)
|
||
|
)
|
||
|
)
|