diff options
| author | Bruno BELANYI <bruno@belanyi.fr> | 2022-06-14 17:24:28 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-06-14 22:34:03 +0200 |
| commit | ef385991b615807df3731b5f0779895515999f33 (patch) | |
| tree | 6c0aa246b08798d9c33a3e2b6faf3660c75d076b /queries/tiger/indents.scm | |
| parent | 6227ae19b88061ec69770d7ef712a4d76c108acb (diff) | |
feat(tiger): initial support
Diffstat (limited to 'queries/tiger/indents.scm')
| -rw-r--r-- | queries/tiger/indents.scm | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/queries/tiger/indents.scm b/queries/tiger/indents.scm new file mode 100644 index 00000000..4ac8d245 --- /dev/null +++ b/queries/tiger/indents.scm @@ -0,0 +1,69 @@ +; Control flow {{{ +(if_expression) @indent +"then" @branch +"else" @branch + +(while_expression) @indent +"do" @branch + +(for_expression) @indent +"to" @branch +; }}} + +; Class {{{ +(class_declaration) @indent +(class_declaration "}" @indent_end) + +(class_type) @indent +(class_type "}" @indent_end) +; }}} + +; Groups {{{ +(let_expression) @indent +"in" @branch +"end" @branch +(let_expression "end" @indent_end) + +(sequence_expression) @indent +")" @branch +(sequence_expression ")" @indent_end) +; }}} + +; Functions and methods {{{ +(parameters) @indent +(parameters ")" @indent_end) + +(function_call) @indent +(method_call) @indent +")" @branch + +(function_declaration) @indent +(primitive_declaration) @indent +(method_declaration) @indent +; }}} + +; Values and expressions {{{ +(array_value) @indent +"]" @branch +(array_value "]" @indent_end) + +(array_expression) @indent +"of" @branch + +(record_expression) @indent +"}" @branch +(record_expression "}" @indent_end) + +(record_type) @indent +"}" @branch +(record_type "}" @indent_end) + +(variable_declaration) @indent +; }}} + +; Misc{{{ +(comment) @ignore +(string_literal) @ignore +; }}} + +; vim: sw=2 foldmethod=marker |
