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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
---input---
classdef Name < dynamicprops
properties
% i am a comment
name1
name2
end
properties (Constant = true, SetAccess = protected)
% i too am a comment
matrix = [0, 1, 2];
string = 'i am a string'
end
methods
% i am also a comment
function self = Name()
% i am a comment inside a constructor
end
end
end
---tokens---
'classdef' Keyword
' ' Text.Whitespace
'Name' Name
' ' Text.Whitespace
'<' Operator
' ' Text.Whitespace
'dynamicprops' Keyword
'\n ' Text.Whitespace
'properties' Keyword
'\n ' Text.Whitespace
'% i am a comment' Comment
'\n ' Text.Whitespace
'name1' Name
'\n ' Text.Whitespace
'name2' Name
'\n ' Text.Whitespace
'end' Keyword
'\n ' Text.Whitespace
'properties' Keyword
' ' Text.Whitespace
'(' Punctuation
'Constant' Name.Builtin
' ' Text.Whitespace
'=' Punctuation
' ' Text.Whitespace
'true' Keyword
',' Punctuation
' ' Text.Whitespace
'SetAccess' Name.Builtin
' ' Text.Whitespace
'=' Punctuation
' ' Text.Whitespace
'protected' Keyword
')' Punctuation
'\n ' Text.Whitespace
'% i too am a comment' Comment
'\n ' Text.Whitespace
'matrix' Name
' ' Text.Whitespace
'=' Punctuation
' ' Text.Whitespace
'[' Punctuation
'0' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'1' Literal.Number.Integer
',' Punctuation
' ' Text.Whitespace
'2' Literal.Number.Integer
']' Punctuation
';' Punctuation
'\n ' Text.Whitespace
'string' Name
' ' Text.Whitespace
'=' Punctuation
' ' Text.Whitespace
"'" Literal.String
"i am a string'" Literal.String
'\n ' Text.Whitespace
'end' Keyword
'\n ' Text.Whitespace
'methods' Keyword
'\n ' Text.Whitespace
'% i am also a comment' Comment
'\n ' Text.Whitespace
'function' Keyword
' ' Text.Whitespace
'self' Text
' ' Text.Whitespace
'=' Punctuation
' ' Text.Whitespace
'Name' Name.Function
'(' Punctuation
')' Punctuation
'\n ' Text.Whitespace
'% i am a comment inside a constructor' Comment
'\n ' Text.Whitespace
'end' Keyword
'\n ' Text.Whitespace
'end' Keyword
'\n' Text.Whitespace
'end' Keyword
'\n' Text.Whitespace
|