Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/mojo/highlights.scm')
| -rw-r--r-- | runtime/queries/mojo/highlights.scm | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/runtime/queries/mojo/highlights.scm b/runtime/queries/mojo/highlights.scm index d6de0a92..7acaf1ea 100644 --- a/runtime/queries/mojo/highlights.scm +++ b/runtime/queries/mojo/highlights.scm @@ -1,28 +1,3 @@ -; Variables - -(identifier) @variable - -(attribute attribute: (identifier) @variable.other.member) - -((identifier) @constant - (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) - -((identifier) @type - (#match? @type "^[A-Z]")) - -; Literals -(none) @constant.builtin -[ - (true) - (false) -] @constant.builtin.boolean - -(integer) @constant.numeric.integer -(float) @constant.numeric.float -(comment) @comment -(string) @string -(escape_sequence) @constant.character.escape - ; Docstrings (expression_statement (string) @comment.block.documentation) @@ -123,6 +98,30 @@ (class_definition name: (identifier) @type) (class_definition superclasses: (argument_list (identifier) @type)) +; Variables + +((identifier) @constant + (#match? @constant "^_*[A-Z][A-Z\\d_]*$")) + +((identifier) @type + (#match? @type "^[A-Z]")) + +(attribute attribute: (identifier) @variable.other.member) +(identifier) @variable + +; Literals +(none) @constant.builtin +[ + (true) + (false) +] @constant.builtin.boolean + +(integer) @constant.numeric.integer +(float) @constant.numeric.float +(comment) @comment +(string) @string +(escape_sequence) @constant.character.escape + ["," "." ":" ";" (ellipsis)] @punctuation.delimiter (interpolation "{" @punctuation.special @@ -247,3 +246,5 @@ ((identifier) @type.builtin (#match? @type.builtin "^(BaseException|Exception|ArithmeticError|BufferError|LookupError|AssertionError|AttributeError|EOFError|FloatingPointError|GeneratorExit|ImportError|ModuleNotFoundError|IndexError|KeyError|KeyboardInterrupt|MemoryError|NameError|NotImplementedError|OSError|OverflowError|RecursionError|ReferenceError|RuntimeError|StopIteration|StopAsyncIteration|SyntaxError|IndentationError|TabError|SystemError|SystemExit|TypeError|UnboundLocalError|UnicodeError|UnicodeEncodeError|UnicodeDecodeError|UnicodeTranslateError|ValueError|ZeroDivisionError|EnvironmentError|IOError|WindowsError|BlockingIOError|ChildProcessError|ConnectionError|BrokenPipeError|ConnectionAbortedError|ConnectionRefusedError|ConnectionResetError|FileExistsError|FileNotFoundError|InterruptedError|IsADirectoryError|NotADirectoryError|PermissionError|ProcessLookupError|TimeoutError|Warning|UserWarning|DeprecationWarning|PendingDeprecationWarning|SyntaxWarning|RuntimeWarning|FutureWarning|ImportWarning|UnicodeWarning|BytesWarning|ResourceWarning)$")) + +(ERROR) @error |