| 1 |
---input--- |
| 2 |
classdef Name < dynamicprops |
| 3 |
properties |
| 4 |
% i am a comment |
| 5 |
name1 |
| 6 |
name2 |
| 7 |
end |
| 8 |
properties (Constant = true, SetAccess = protected) |
| 9 |
% i too am a comment |
| 10 |
matrix = [0, 1, 2]; |
| 11 |
string = 'i am a string' |
| 12 |
end |
| 13 |
methods |
| 14 |
% i am also a comment |
| 15 |
function self = Name() |
| 16 |
% i am a comment inside a constructor |
| 17 |
end |
| 18 |
end |
| 19 |
end |
| 20 |
|
| 21 |
---tokens--- |
| 22 |
'classdef' Keyword |
| 23 |
' ' Text.Whitespace |
| 24 |
'Name' Name |
| 25 |
' ' Text.Whitespace |
| 26 |
'<' Operator |
| 27 |
' ' Text.Whitespace |
| 28 |
'dynamicprops' Keyword |
| 29 |
'\n ' Text.Whitespace |
| 30 |
'properties' Keyword |
| 31 |
'\n ' Text.Whitespace |
| 32 |
'% i am a comment' Comment |
| 33 |
'\n ' Text.Whitespace |
| 34 |
'name1' Name |
| 35 |
'\n ' Text.Whitespace |
| 36 |
'name2' Name |
| 37 |
'\n ' Text.Whitespace |
| 38 |
'end' Keyword |
| 39 |
'\n ' Text.Whitespace |
| 40 |
'properties' Keyword |
| 41 |
' ' Text.Whitespace |
| 42 |
'(' Punctuation |
| 43 |
'Constant' Name.Builtin |
| 44 |
' ' Text.Whitespace |
| 45 |
'=' Punctuation |
| 46 |
' ' Text.Whitespace |
| 47 |
'true' Keyword |
| 48 |
',' Punctuation |
| 49 |
' ' Text.Whitespace |
| 50 |
'SetAccess' Name.Builtin |
| 51 |
' ' Text.Whitespace |
| 52 |
'=' Punctuation |
| 53 |
' ' Text.Whitespace |
| 54 |
'protected' Keyword |
| 55 |
')' Punctuation |
| 56 |
'\n ' Text.Whitespace |
| 57 |
'% i too am a comment' Comment |
| 58 |
'\n ' Text.Whitespace |
| 59 |
'matrix' Name |
| 60 |
' ' Text.Whitespace |
| 61 |
'=' Punctuation |
| 62 |
' ' Text.Whitespace |
| 63 |
'[' Punctuation |
| 64 |
'0' Literal.Number.Integer |
| 65 |
',' Punctuation |
| 66 |
' ' Text.Whitespace |
| 67 |
'1' Literal.Number.Integer |
| 68 |
',' Punctuation |
| 69 |
' ' Text.Whitespace |
| 70 |
'2' Literal.Number.Integer |
| 71 |
']' Punctuation |
| 72 |
';' Punctuation |
| 73 |
'\n ' Text.Whitespace |
| 74 |
'string' Name |
| 75 |
' ' Text.Whitespace |
| 76 |
'=' Punctuation |
| 77 |
' ' Text.Whitespace |
| 78 |
"'" Literal.String |
| 79 |
"i am a string'" Literal.String |
| 80 |
'\n ' Text.Whitespace |
| 81 |
'end' Keyword |
| 82 |
'\n ' Text.Whitespace |
| 83 |
'methods' Keyword |
| 84 |
'\n ' Text.Whitespace |
| 85 |
'% i am also a comment' Comment |
| 86 |
'\n ' Text.Whitespace |
| 87 |
'function' Keyword |
| 88 |
' ' Text.Whitespace |
| 89 |
'self' Text |
| 90 |
' ' Text.Whitespace |
| 91 |
'=' Punctuation |
| 92 |
' ' Text.Whitespace |
| 93 |
'Name' Name.Function |
| 94 |
'(' Punctuation |
| 95 |
')' Punctuation |
| 96 |
'\n ' Text.Whitespace |
| 97 |
'% i am a comment inside a constructor' Comment |
| 98 |
'\n ' Text.Whitespace |
| 99 |
'end' Keyword |
| 100 |
'\n ' Text.Whitespace |
| 101 |
'end' Keyword |
| 102 |
'\n' Text.Whitespace |
| 103 |
|
| 104 |
'end' Keyword |
| 105 |
'\n' Text.Whitespace |