feat: comprehensive query files for all block types and VAR sections (Phase 3)
Update all 5 tree-sitter query files to cover the full grammar: highlights.scm: - Add highlights for new literals (binary, octal, date, bool, typed_int, wstring, char) - Add highlights for block names (organization_block, function_block, function, data_block, type_definition) - Add highlights for return_statement, goto_statement, title_statement - Add highlights for bit_access, method_callee - Add compound assignment operators (+=, -=, *=, /=, etc.) indents.scm: - Add function, type_definition, data_block to @indent.begin - Add all var_*_declaration variants to @indent.begin - Add struct_type to @indent.begin - Add END_FUNCTION, END_TYPE, END_DATA_BLOCK, END_STRUCT to @indent.end folds.scm: - Add function, type_definition, data_block to @fold - Add all var_*_declaration variants to @fold - Add struct_type to @fold locals.scm: - Add function, type_definition, data_block as @local.scope - Add all var_*_declaration variants as @local.scope - Add struct_type as @local.scope - Add block name definitions (@definition.function, @definition.class, @definition.type) - Narrow @reference to prefixed_identifier only (reduces noise) tags.scm: - Add function, data_block, type_definition tags - Add FB call references - Add region_statement as @definition.module
This commit is contained in:
+26
-2
@@ -1,10 +1,26 @@
|
||||
; Indentation rules for SCL
|
||||
|
||||
; Indent after block keywords
|
||||
; Indent after block definitions
|
||||
[
|
||||
(organization_block)
|
||||
(function_block)
|
||||
(function)
|
||||
(type_definition)
|
||||
(data_block)
|
||||
] @indent.begin
|
||||
|
||||
; Indent after VAR sections
|
||||
[
|
||||
(var_declaration)
|
||||
(var_temp_declaration)
|
||||
(var_constant_declaration)
|
||||
(var_retain_declaration)
|
||||
(var_non_retain_declaration)
|
||||
(var_db_specific_declaration)
|
||||
] @indent.begin
|
||||
|
||||
; Indent after control structures
|
||||
[
|
||||
(if_statement)
|
||||
(case_statement)
|
||||
(for_statement)
|
||||
@@ -13,12 +29,16 @@
|
||||
(region_statement)
|
||||
] @indent.begin
|
||||
|
||||
; Indent after THEN, DO, etc.
|
||||
; Indent after STRUCT in UDTs and inline structs
|
||||
(struct_type) @indent.begin
|
||||
|
||||
; Indent after THEN, DO, ELSE, ELSIF, BEGIN
|
||||
[
|
||||
"THEN"
|
||||
"DO"
|
||||
"ELSE"
|
||||
"ELSIF"
|
||||
(keyword) @indent.branch
|
||||
] @indent.branch
|
||||
|
||||
; Outdent at end keywords
|
||||
@@ -30,8 +50,12 @@
|
||||
"END_WHILE"
|
||||
"END_REPEAT"
|
||||
"END_REGION"
|
||||
"END_STRUCT"
|
||||
"END_ORGANIZATION_BLOCK"
|
||||
"END_FUNCTION_BLOCK"
|
||||
"END_FUNCTION"
|
||||
"END_TYPE"
|
||||
"END_DATA_BLOCK"
|
||||
] @indent.end
|
||||
|
||||
; Outdent for ELSE and ELSIF
|
||||
|
||||
Reference in New Issue
Block a user