Hash :
8019e2f6
Author :
Date :
2021-02-19T17:41:31
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
enum Foo implements Bar {}
enum Suit {
case Hearts;
case Diamonds = 'D';
}
$val = Suit::Diamonds;
Suit::Spades->name;
----------------------------------------------------
[
["keyword", "enum"],
["class-name-definition", "Foo"],
["keyword", "implements"],
["class-name", "Bar"],
["punctuation", "{"],
["punctuation", "}"],
["keyword", "enum"],
["class-name-definition", "Suit"],
["punctuation", "{"],
["keyword", "case"],
["constant", "Hearts"],
["punctuation", ";"],
["keyword", "case"],
["constant", "Diamonds"],
["operator", "="],
["string", "'D'"],
["punctuation", ";"],
["punctuation", "}"],
["variable", "$val"],
["operator", "="],
["class-name", "Suit"],
["operator", "::"],
["constant", "Diamonds"],
["punctuation", ";"],
["class-name", "Suit"],
["operator", "::"],
["constant", "Spades"],
["operator", "->"],
["property", "name"],
["punctuation", ";"]
]
----------------------------------------------------
Checks for enums.