diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2023-06-12 09:54:30 -0600 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 692b051b09935653befdb8f7ba8afdb640adf17b (patch) | |
| tree | 167162b6b129ae04f68c5735078521a72917c742 /queries/tiger | |
| parent | feat(c-family): inherit injections (diff) | |
| download | nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.gz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.bz2 nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.lz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.xz nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.tar.zst nvim-treesitter-692b051b09935653befdb8f7ba8afdb640adf17b.zip | |
feat!: drop modules, general refactor and cleanup
Diffstat (limited to 'queries/tiger')
| -rw-r--r-- | queries/tiger/folds.scm | 17 | ||||
| -rw-r--r-- | queries/tiger/highlights.scm | 121 | ||||
| -rw-r--r-- | queries/tiger/indents.scm | 104 | ||||
| -rw-r--r-- | queries/tiger/injections.scm | 4 | ||||
| -rw-r--r-- | queries/tiger/locals.scm | 39 |
5 files changed, 0 insertions, 285 deletions
diff --git a/queries/tiger/folds.scm b/queries/tiger/folds.scm deleted file mode 100644 index 3b076bc18..000000000 --- a/queries/tiger/folds.scm +++ /dev/null @@ -1,17 +0,0 @@ -[ - (array_expression) - (record_expression) - (sequence_expression) - (if_expression) - (while_expression) - (for_expression) - (let_expression) - (function_declaration) - (primitive_declaration) - (record_type) - (class_declaration) - (class_type) - (method_declaration) -] @fold - -; vim: sw=2 foldmethod=marker diff --git a/queries/tiger/highlights.scm b/queries/tiger/highlights.scm deleted file mode 100644 index cbb1f2310..000000000 --- a/queries/tiger/highlights.scm +++ /dev/null @@ -1,121 +0,0 @@ -; Built-ins {{{ -((function_call - function: (identifier) @function.builtin) - (#any-of? @function.builtin - "chr" "concat" "exit" "flush" "getchar" "not" "ord" "print" "print_err" "print_int" "size" - "strcmp" "streq" "substring")) - -((type_identifier) @type.builtin - (#any-of? @type.builtin "int" "string" "Object")) - -((identifier) @variable.builtin - (#eq? @variable.builtin "self")) - -; }}} -; Keywords {{{ -[ - "function" - "primitive" - "method" -] @keyword.function - -[ - "do" - "for" - "to" - "while" -] @keyword.repeat - -"new" @keyword.operator - -"import" @keyword.import - -[ - "array" - (break_expression) - "else" - "end" - "if" - "in" - "let" - "of" - "then" - "type" - "var" - "extends" - "_cast" - "_chunks" - "_exp" - "_lvalue" - "_namety" -] @keyword - -"class" @keyword.type - -; }}} -; Operators {{{ -(operator) @operator - -[ - "," - ";" - ":" - "." -] @punctuation.delimiter - -[ - "(" - ")" - "[" - "]" - "{" - "}" -] @punctuation.bracket - -; }}} -; Functions and methods {{{ -(function_call - function: (identifier) @function) - -(function_declaration - name: (identifier) @function) - -(primitive_declaration - name: (identifier) @function) - -(method_call - method: (identifier) @function.method) - -(method_declaration - name: (identifier) @function.method) - -(parameters - name: (identifier) @variable.parameter) - -; }}} -; Declarations {{{ -(import_declaration - file: (string_literal) @string.special.path) - -; }}} -; Literals {{{ -(nil_literal) @constant.builtin - -(integer_literal) @number - -(string_literal) @string - -(escape_sequence) @string.escape - -; }}} -; Misc {{{ -(comment) @comment @spell - -(type_identifier) @type - -(field_identifier) @variable.member - -(identifier) @variable - -; }}} -; vim: sw=2 foldmethod=marker diff --git a/queries/tiger/indents.scm b/queries/tiger/indents.scm deleted file mode 100644 index 686bfde16..000000000 --- a/queries/tiger/indents.scm +++ /dev/null @@ -1,104 +0,0 @@ -; Control flow {{{ -(if_expression) @indent.begin - -"then" @indent.branch - -"else" @indent.branch - -(while_expression) @indent.begin - -"do" @indent.branch - -(for_expression) @indent.begin - -"to" @indent.branch - -; }}} -; Class {{{ -(class_declaration) @indent.begin - -(class_declaration - "}" @indent.end) - -(class_type) @indent.begin - -(class_type - "}" @indent.end) - -; }}} -; Groups {{{ -(let_expression) @indent.begin - -"in" @indent.branch - -"end" @indent.branch - -(let_expression - "end" @indent.end) - -(sequence_expression) @indent.begin - -")" @indent.branch - -(sequence_expression - ")" @indent.end) - -; }}} -; Functions and methods {{{ -(parameters) @indent.begin - -(parameters - ")" @indent.end) - -(function_call) @indent.begin - -(function_call - ")" @indent.end) - -(method_call) @indent.begin - -")" @indent.branch - -(function_declaration) @indent.begin - -(primitive_declaration) @indent.begin - -(method_declaration) @indent.begin - -; }}} -; Values and expressions {{{ -(array_value) @indent.begin - -"]" @indent.branch - -(array_value - "]" @indent.end) - -(array_expression) @indent.begin - -"of" @indent.branch - -(record_expression) @indent.begin - -"}" @indent.branch - -(record_expression - "}" @indent.end) - -(record_type) @indent.begin - -"}" @indent.branch - -(record_type - "}" @indent.end) - -(variable_declaration) @indent.begin - -; }}} -; Misc{{{ -(comment) @indent.ignore - -(string_literal) @indent.ignore - -; }}} -; vim: sw=2 foldmethod=marker diff --git a/queries/tiger/injections.scm b/queries/tiger/injections.scm deleted file mode 100644 index 9735c5935..000000000 --- a/queries/tiger/injections.scm +++ /dev/null @@ -1,4 +0,0 @@ -((comment) @injection.content - (#set! injection.language "comment")) - -; vim: sw=2 foldmethod=marker diff --git a/queries/tiger/locals.scm b/queries/tiger/locals.scm deleted file mode 100644 index cd8dcd65f..000000000 --- a/queries/tiger/locals.scm +++ /dev/null @@ -1,39 +0,0 @@ -; See this issue [1] for support for "lazy scoping" which is somewhat needed -; for Tiger semantics (e.g: one can call a function before it has been defined -; top-to-bottom). -; -; [1]: https://github.com/tree-sitter/tree-sitter/issues/918 -; Scopes {{{ -[ - (for_expression) - (let_expression) - (function_declaration) -] @local.scope - -; }}} -; Definitions {{{ -(type_declaration - name: (identifier) @local.definition.type - (#set! definition.var.scope "parent")) - -(parameters - name: (identifier) @local.definition.parameter) - -(function_declaration - name: (identifier) @local.definition.function - (#set! definition.var.scope "parent")) - -(primitive_declaration - name: (identifier) @local.definition.function - (#set! definition.var.scope "parent")) - -(variable_declaration - name: (identifier) @local.definition.var - (#set! definition.var.scope "parent")) - -; }}} -; References {{{ -(identifier) @local.reference - -; }}} -; vim: sw=2 foldmethod=marker |
