103 aliases = ['clay'] |
103 aliases = ['clay'] |
104 mimetypes = ['text/x-clay'] |
104 mimetypes = ['text/x-clay'] |
105 tokens = { |
105 tokens = { |
106 'root': [ |
106 'root': [ |
107 (r'\s', Text), |
107 (r'\s', Text), |
108 (r'//.*?$', Comment.Singleline), |
108 (r'//.*?$', Comment.Single), |
109 (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), |
109 (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), |
110 (r'\b(public|private|import|as|record|variant|instance' |
110 (r'\b(public|private|import|as|record|variant|instance' |
111 r'|define|overload|default|external|alias' |
111 r'|define|overload|default|external|alias' |
112 r'|rvalue|ref|forward|inline|noinline|forceinline' |
112 r'|rvalue|ref|forward|inline|noinline|forceinline' |
113 r'|enum|var|and|or|not|if|else|goto|return|while' |
113 r'|enum|var|and|or|not|if|else|goto|return|while' |
243 'int32', 'int64', 'long', 'short', 'size_t', 'ssize_t', 'string', |
243 'int32', 'int64', 'long', 'short', 'size_t', 'ssize_t', 'string', |
244 'time_t', 'uchar', 'uint', 'uint8', 'uint16', 'uint32', 'uint64', |
244 'time_t', 'uchar', 'uint', 'uint8', 'uint16', 'uint32', 'uint64', |
245 'ulong', 'unichar', 'ushort'), suffix=r'\b'), |
245 'ulong', 'unichar', 'ushort'), suffix=r'\b'), |
246 Keyword.Type), |
246 Keyword.Type), |
247 (r'(true|false|null)\b', Name.Builtin), |
247 (r'(true|false|null)\b', Name.Builtin), |
248 ('[a-zA-Z_]\w*', Name), |
248 (r'[a-zA-Z_]\w*', Name), |
249 ], |
249 ], |
250 'root': [ |
250 'root': [ |
251 include('whitespace'), |
251 include('whitespace'), |
252 default('statement'), |
252 default('statement'), |
253 ], |
253 ], |
342 tokens = { |
342 tokens = { |
343 'statements': [ |
343 'statements': [ |
344 # SWIG directives |
344 # SWIG directives |
345 (r'(%[a-z_][a-z0-9_]*)', Name.Function), |
345 (r'(%[a-z_][a-z0-9_]*)', Name.Function), |
346 # Special variables |
346 # Special variables |
347 ('\$\**\&?\w+', Name), |
347 (r'\$\**\&?\w+', Name), |
348 # Stringification / additional preprocessor directives |
348 # Stringification / additional preprocessor directives |
349 (r'##*[a-zA-Z_]\w*', Comment.Preproc), |
349 (r'##*[a-zA-Z_]\w*', Comment.Preproc), |
350 inherit, |
350 inherit, |
351 ], |
351 ], |
352 } |
352 } |