| 1 |
# Most of the interesting types of class declarations |
| 2 |
|
| 3 |
---input--- |
| 4 |
class Foo; |
| 5 |
endclass |
| 6 |
|
| 7 |
class Bar; |
| 8 |
endclass : Bar |
| 9 |
|
| 10 |
class Fiz extends Buz; |
| 11 |
endclass : Fiz |
| 12 |
|
| 13 |
class Free #(parameter type T = byte) extends Beer #(T); |
| 14 |
endclass : Free |
| 15 |
|
| 16 |
---tokens--- |
| 17 |
'class' Keyword.Declaration |
| 18 |
' ' Text.Whitespace |
| 19 |
'Foo' Name.Class |
| 20 |
';' Punctuation |
| 21 |
'\n' Text.Whitespace |
| 22 |
|
| 23 |
'endclass' Keyword.Declaration |
| 24 |
'\n\n' Text.Whitespace |
| 25 |
|
| 26 |
'class' Keyword.Declaration |
| 27 |
' ' Text.Whitespace |
| 28 |
'Bar' Name.Class |
| 29 |
';' Punctuation |
| 30 |
'\n' Text.Whitespace |
| 31 |
|
| 32 |
'endclass' Keyword.Declaration |
| 33 |
' ' Text.Whitespace |
| 34 |
':' Punctuation |
| 35 |
' ' Text.Whitespace |
| 36 |
'Bar' Name.Class |
| 37 |
'\n\n' Text.Whitespace |
| 38 |
|
| 39 |
'class' Keyword.Declaration |
| 40 |
' ' Text.Whitespace |
| 41 |
'Fiz' Name.Class |
| 42 |
' ' Text.Whitespace |
| 43 |
'extends' Keyword.Declaration |
| 44 |
' ' Text.Whitespace |
| 45 |
'Buz' Name.Class |
| 46 |
';' Punctuation |
| 47 |
'\n' Text.Whitespace |
| 48 |
|
| 49 |
'endclass' Keyword.Declaration |
| 50 |
' ' Text.Whitespace |
| 51 |
':' Punctuation |
| 52 |
' ' Text.Whitespace |
| 53 |
'Fiz' Name.Class |
| 54 |
'\n\n' Text.Whitespace |
| 55 |
|
| 56 |
'class' Keyword.Declaration |
| 57 |
' ' Text.Whitespace |
| 58 |
'Free' Name.Class |
| 59 |
' ' Text.Whitespace |
| 60 |
'#' Punctuation |
| 61 |
'(' Punctuation |
| 62 |
'parameter' Keyword |
| 63 |
' ' Text.Whitespace |
| 64 |
'type' Keyword.Type |
| 65 |
' ' Text.Whitespace |
| 66 |
'T' Name |
| 67 |
' ' Text.Whitespace |
| 68 |
'=' Operator |
| 69 |
' ' Text.Whitespace |
| 70 |
'byte' Keyword.Type |
| 71 |
')' Punctuation |
| 72 |
' ' Text.Whitespace |
| 73 |
'extends' Keyword.Declaration |
| 74 |
' ' Text.Whitespace |
| 75 |
'Beer' Name.Class |
| 76 |
' ' Text.Whitespace |
| 77 |
'#' Punctuation |
| 78 |
'(' Punctuation |
| 79 |
'T' Name |
| 80 |
')' Punctuation |
| 81 |
';' Punctuation |
| 82 |
'\n' Text.Whitespace |
| 83 |
|
| 84 |
'endclass' Keyword.Declaration |
| 85 |
' ' Text.Whitespace |
| 86 |
':' Punctuation |
| 87 |
' ' Text.Whitespace |
| 88 |
'Free' Name.Class |
| 89 |
'\n' Text.Whitespace |