- Add aliases for keywords (VAR_INPUT, BEGIN, IF, etc.) as named nodes - Add aliases for built-in types (INT, BOOL, STRING, etc.) as type_builtin - Add aliases for constants (TRUE, FALSE) - Add aliases for operators (AND, OR, NOT, MOD) - Add prefix node for # variable prefix highlighting - Highlight FB instance names in calls - Highlight FB parameter names as properties - Update README with detailed syntax highlighting features - Update .gitignore for *.wasm files
96 lines
1.6 KiB
Scheme
96 lines
1.6 KiB
Scheme
; SCL highlights
|
|
|
|
(line_comment) @comment
|
|
(block_comment) @comment
|
|
(c_style_comment) @comment
|
|
|
|
(number) @number
|
|
(hex_number) @number
|
|
(string) @string
|
|
(time_value) @number
|
|
|
|
(prefix) @punctuation.special
|
|
|
|
(identifier) @variable
|
|
|
|
; FB instance calls - highlight instance name as type
|
|
(fb_call
|
|
instance: (prefixed_identifier
|
|
(identifier) @type))
|
|
(fb_call
|
|
instance: (identifier) @type)
|
|
|
|
; FB parameter names (IN :=, PT :=, etc.)
|
|
(fb_parameter
|
|
name: (identifier) @property)
|
|
|
|
; Function call names
|
|
(function_call
|
|
(identifier) @function)
|
|
|
|
; Variable declarations
|
|
(var_item
|
|
name: (identifier) @variable)
|
|
|
|
; Type references in declarations
|
|
(type
|
|
(identifier) @type)
|
|
|
|
(type_builtin) @type.builtin
|
|
|
|
(keyword) @keyword
|
|
(constant) @constant.builtin
|
|
(operator) @operator
|
|
|
|
(assignment) @operator
|
|
(binary_expression) @operator
|
|
(unary_expression) @operator
|
|
|
|
(field_access
|
|
"."
|
|
(identifier) @property)
|
|
|
|
(array_access) @property
|
|
|
|
(attribute_list) @attribute
|
|
(attribute) @attribute
|
|
(attribute_value) @string
|
|
|
|
(var_item) @property
|
|
|
|
(function_call) @function.call
|
|
(fb_call) @function.call
|
|
|
|
(if_statement) @conditional
|
|
(elsif_clause) @conditional
|
|
(else_clause) @conditional
|
|
(case_statement) @conditional
|
|
(case_item) @conditional
|
|
|
|
(for_statement) @repeat
|
|
(while_statement) @repeat
|
|
(repeat_statement) @repeat
|
|
|
|
";" @punctuation.delimiter
|
|
":" @punctuation.delimiter
|
|
"," @punctuation.delimiter
|
|
"(" @punctuation.bracket
|
|
")" @punctuation.bracket
|
|
"[" @punctuation.bracket
|
|
"]" @punctuation.bracket
|
|
"." @punctuation.delimiter
|
|
|
|
":=" @operator
|
|
"=>" @operator
|
|
"=" @operator
|
|
"<>" @operator
|
|
"<" @operator
|
|
">" @operator
|
|
"<=" @operator
|
|
">=" @operator
|
|
|
|
"+" @operator
|
|
"-" @operator
|
|
"*" @operator
|
|
"/" @operator
|