This commit is contained in:
Hannah Kimura 2026-04-03 12:24:19 +02:00 committed by GitHub
commit 5daa56b595
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 912 additions and 0 deletions

View file

@ -196,6 +196,8 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | @steelsojka
[nu](https://github.com/nushell/tree-sitter-nu) | unstable | `HFIJ ` | @abhisheksingh0x558
[objc](https://github.com/tree-sitter-grammars/tree-sitter-objc) | unstable | `HFIJL` | @amaanq
[objdump](https://github.com/ColinKennedy/tree-sitter-objdump) | unstable | `H  J ` | @ColinKennedy
[objectscript_routine](https://github.com/intersystems/tree-sitter-objectscript) | unstable | `H IJ ` | @davem-intersys, @hkimura-intersys
[objectscript_udl](https://github.com/intersystems/tree-sitter-objectscript) | unstable | `H IJ ` | @davem-intersys, @hkimura-intersys
[ocaml](https://github.com/tree-sitter/tree-sitter-ocaml) | unstable | `HFIJL` | @undu
[ocaml_interface](https://github.com/tree-sitter/tree-sitter-ocaml) | unstable | `HFIJL` | @undu
[ocamllex](https://github.com/atom-ocaml/tree-sitter-ocamllex) | unstable | `H  J ` | @undu

View file

@ -1506,6 +1506,24 @@ return {
maintainers = { '@ColinKennedy' },
tier = 2,
},
objectscript_routine = {
install_info = {
location = 'objectscript_routine',
revision = '4216acea5ba1c92217f0d366c9d9c7b44b34a7b9',
url = 'https://github.com/intersystems/tree-sitter-objectscript',
},
maintainers = { '@davem-intersys', '@hkimura-intersys' },
tier = 2,
},
objectscript_udl = {
install_info = {
location = 'udl',
revision = '4216acea5ba1c92217f0d366c9d9c7b44b34a7b9',
url = 'https://github.com/intersystems/tree-sitter-objectscript',
},
maintainers = { '@davem-intersys', '@hkimura-intersys' },
tier = 2,
},
ocaml = {
install_info = {
location = 'grammars/ocaml',

View file

@ -32,6 +32,7 @@ local filetypes = {
make = { 'automake' },
markdown = { 'pandoc' },
muttrc = { 'neomuttrc' },
objectscript_udl = { 'objectscript' },
ocaml_interface = { 'ocamlinterface' },
perl = { 'pl' },
poe_filter = { 'poefilter' },

View file

@ -0,0 +1,287 @@
; AUTO-GENERATED by scripts/sync_queries.py
; Edit only the LOCAL section in composed files.
; File: highlights.scm
; === BEGIN EXPR ===
(pattern_expression) @string.regexp
[
(json_number_literal)
(numeric_literal)
] @number
[
(json_boolean_literal)
(json_null_literal)
] @boolean
(json_object_literal_pair
(json_string_literal) @string.special)
[
(json_string_literal)
(string_literal)
] @string
[
(keyword_pound_pound_super)
(keyword_pound_pound_class)
] @keyword.operator
(system_defined_variable) @variable.builtin
(system_defined_function) @function.builtin
(sql_field_modifier) @keyword.modifier
[
(property_name)
(parameter_name)
(sql_field_identifier)
] @variable.member
(method_name) @function.method
[
(routine_name)
(class_name)
] @type
(macro_function) @function.macro
(macro_constant) @constant.macro
[
(lvn)
(gvn)
(ssvn)
(objectscript_identifier)
] @variable
(namespace) @module
[
(objectscript_identifier_special)
(instance_variable)
] @variable.member
(method_arg) @variable.parameter
; I didn't include ( or ) in this, because they are often grouped
; as part of a sequence that gets turned into a single token, so they
; don't get matched, and one ends up getting colored differently than the other.
[
"_"
","
":"
".."
"..."
"'["
"']"
"']]"
"\""
"\"\""
"["
"]"
"]]"
"{"
"}"
"/"
"\\"
"#"
"|"
"||"
"$$"
] @punctuation.delimiter
[
"'&"
"&"
"&&"
"'<"
"'="
"'>"
"^"
"-"
"^$"
"+"
"<"
"<="
"="
">"
">="
"@"
"*"
"**"
"'"
"'!"
"'?"
"!"
"?"
] @operator
(bracket) @punctuation.bracket
; === END EXPR ===
; === BEGIN CORE ===
(macro_arg) @variable.member
(macro_value) @constant.builtin
(macro_def) @keyword.directive.define
[
(keyword_for)
(keyword_while)
(keyword_continue)
(keyword_quit)
] @keyword.repeat
[
(keyword_if)
(keyword_elseif)
(keyword_else)
(keyword_oldelse)
] @keyword.conditional
[
(keyword_throw)
(keyword_try)
(keyword_catch)
] @keyword.exception
(keyword_return) @keyword.return
[
(keyword_break)
(keyword_zbreak)
(keyword_debug)
(keyword_trace)
(keyword_step)
(keyword_nostep)
(keyword_stepmethod)
(keyword_errortrap)
(keyword_interrupt)
(keyword_normal)
(keyword_zkill)
(keyword_zn)
(keyword_zsu)
(keyword_ztrap)
(keyword_zz)
] @keyword.debug
[
(keyword_pound_define)
(keyword_pound_def1arg)
(keyword_pound_if)
(keyword_pound_elseif)
(keyword_pound_else)
(keyword_pound_endif)
(keyword_pound_ifdef)
(keyword_pound_ifndef)
(keyword_dim)
(keyword_pound_import)
(keyword_pound_include)
(keyword_pound_delay)
(locktype)
] @keyword.directive
[
(keyword_as)
(keyword_of)
(keyword_public)
(keyword_private)
(keyword_methodimpl)
(device_keywords)
(close_parameter_option_value)
(keyword_clear)
(keyword_on)
(keyword_off)
(keyword_all)
(keyword_ext)
(keyword_stepmethod)
(keyword_destruct)
] @keyword.modifier
[
(keyword_print)
(keyword_zprint)
(keyword_set)
(keyword_write)
(keyword_zwrite)
(keyword_do)
(keyword_for)
(keyword_while)
(keyword_kill)
(keyword_lock)
(keyword_read)
(keyword_open)
(keyword_close)
(keyword_use)
(keyword_new)
(keyword_job)
(keyword_merge)
(keyword_goto)
(keyword_halt_or_hang)
(keyword_halt)
(keyword_hang)
(keyword_tcommit)
(keyword_trollback)
(keyword_tstart)
(keyword_xecute)
(keyword_view)
] @function.builtin
[
(keyword_embedded_html)
(keyword_embedded_xml)
(keyword_embedded_sql_amp)
(keyword_embedded_sql_hash)
(keyword_js)
] @keyword.operator
[
(embedded_js_special_case_complete)
(embedded_sql_marker)
(embedded_sql_reverse_marker)
(html_marker)
(html_marker_reversed)
] @punctuation.special
[
(line_comment_1)
(line_comment_2)
(line_comment_3)
(line_comment_4)
(block_comment)
] @comment @spell
(namespace) @module
(tag) @label
[
(command_quit)
(command_else)
(command_continue)
(command_if)
(command_do)
(command_for)
(command_lock)
(command_return)
(command_halt_or_hang)
(command_break)
] @comment
"--" @operator
; === END CORE ===
; === BEGIN LOCAL ===
(routine_type) @type.builtin
(documatic_line) @comment.documentation @spell
(routine) @keyword.type
(compiled_header) @markup.heading
; === END LOCAL ===

View file

@ -0,0 +1,11 @@
; AUTO-GENERATED by scripts/sync_queries.py
; Edit only the LOCAL section in composed files.
; File: indents.scm
; === BEGIN CORE ===
"{" @indent.begin
"}" @indent.end
; === END CORE ===
; === BEGIN LOCAL ===
; === END LOCAL ===

View file

@ -0,0 +1,35 @@
; AUTO-GENERATED by scripts/sync_queries.py
; Edit only the LOCAL section in composed files.
; File: injections.scm
; === BEGIN CORE ===
(embedded_html
(angled_bracket_fenced_text) @injection.content
(#set! injection.language "html"))
(embedded_sql
(_
(paren_fenced_text) @injection.content)
(#set! injection.language "sql"))
(embedded_js
[
(angled_bracket_fenced_text)
(embedded_js_special_case)
] @injection.content
(#set! injection.language "javascript"))
(embedded_xml
(angled_bracket_fenced_text) @injection.content
(#set! injection.language "xml"))
([
(line_comment_1)
(line_comment_2)
(line_comment_3)
(block_comment)
] @injection.content
(#set! injection.language "comment"))
; === END CORE ===
; === BEGIN LOCAL ===
; === END LOCAL ===

View file

@ -0,0 +1,358 @@
; AUTO-GENERATED by scripts/sync_queries.py
; Edit only the LOCAL section in composed files.
; File: highlights.scm
; === BEGIN EXPR ===
(pattern_expression) @string.regexp
[
(json_number_literal)
(numeric_literal)
] @number
[
(json_boolean_literal)
(json_null_literal)
] @boolean
(json_object_literal_pair
(json_string_literal) @string.special)
[
(json_string_literal)
(string_literal)
] @string
[
(keyword_pound_pound_super)
(keyword_pound_pound_class)
] @keyword.operator
(system_defined_variable) @variable.builtin
(system_defined_function) @function.builtin
(sql_field_modifier) @keyword.modifier
[
(property_name)
(parameter_name)
(sql_field_identifier)
] @variable.member
(method_name) @function.method
[
(routine_name)
(class_name)
] @type
(macro_function) @function.macro
(macro_constant) @constant.macro
[
(lvn)
(gvn)
(ssvn)
(objectscript_identifier)
] @variable
(namespace) @module
[
(objectscript_identifier_special)
(instance_variable)
] @variable.member
(method_arg) @variable.parameter
; I didn't include ( or ) in this, because they are often grouped
; as part of a sequence that gets turned into a single token, so they
; don't get matched, and one ends up getting colored differently than the other.
[
"_"
","
":"
".."
"..."
"'["
"']"
"']]"
"\""
"\"\""
"["
"]"
"]]"
"{"
"}"
"/"
"\\"
"#"
"|"
"||"
"$$"
] @punctuation.delimiter
[
"'&"
"&"
"&&"
"'<"
"'="
"'>"
"^"
"-"
"^$"
"+"
"<"
"<="
"="
">"
">="
"@"
"*"
"**"
"'"
"'!"
"'?"
"!"
"?"
] @operator
(bracket) @punctuation.bracket
; === END EXPR ===
; === BEGIN CORE ===
(macro_arg) @variable.member
(macro_value) @constant.builtin
(macro_def) @keyword.directive.define
[
(keyword_for)
(keyword_while)
(keyword_continue)
(keyword_quit)
] @keyword.repeat
[
(keyword_if)
(keyword_elseif)
(keyword_else)
(keyword_oldelse)
] @keyword.conditional
[
(keyword_throw)
(keyword_try)
(keyword_catch)
] @keyword.exception
(keyword_return) @keyword.return
[
(keyword_break)
(keyword_zbreak)
(keyword_debug)
(keyword_trace)
(keyword_step)
(keyword_nostep)
(keyword_stepmethod)
(keyword_errortrap)
(keyword_interrupt)
(keyword_normal)
(keyword_zkill)
(keyword_zn)
(keyword_zsu)
(keyword_ztrap)
(keyword_zz)
] @keyword.debug
[
(keyword_pound_define)
(keyword_pound_def1arg)
(keyword_pound_if)
(keyword_pound_elseif)
(keyword_pound_else)
(keyword_pound_endif)
(keyword_pound_ifdef)
(keyword_pound_ifndef)
(keyword_dim)
(keyword_pound_import)
(keyword_pound_include)
(keyword_pound_delay)
(locktype)
] @keyword.directive
[
(keyword_as)
(keyword_of)
(keyword_public)
(keyword_private)
(keyword_methodimpl)
(device_keywords)
(close_parameter_option_value)
(keyword_clear)
(keyword_on)
(keyword_off)
(keyword_all)
(keyword_ext)
(keyword_stepmethod)
(keyword_destruct)
] @keyword.modifier
[
(keyword_print)
(keyword_zprint)
(keyword_set)
(keyword_write)
(keyword_zwrite)
(keyword_do)
(keyword_for)
(keyword_while)
(keyword_kill)
(keyword_lock)
(keyword_read)
(keyword_open)
(keyword_close)
(keyword_use)
(keyword_new)
(keyword_job)
(keyword_merge)
(keyword_goto)
(keyword_halt_or_hang)
(keyword_halt)
(keyword_hang)
(keyword_tcommit)
(keyword_trollback)
(keyword_tstart)
(keyword_xecute)
(keyword_view)
] @function.builtin
[
(keyword_embedded_html)
(keyword_embedded_xml)
(keyword_embedded_sql_amp)
(keyword_embedded_sql_hash)
(keyword_js)
] @keyword.operator
[
(embedded_js_special_case_complete)
(embedded_sql_marker)
(embedded_sql_reverse_marker)
(html_marker)
(html_marker_reversed)
] @punctuation.special
[
(line_comment_1)
(line_comment_2)
(line_comment_3)
(line_comment_4)
(block_comment)
] @comment @spell
(namespace) @module
(tag) @label
[
(command_quit)
(command_else)
(command_continue)
(command_if)
(command_do)
(command_for)
(command_lock)
(command_return)
(command_halt_or_hang)
(command_break)
] @comment
"--" @operator
; === END CORE ===
; === BEGIN LOCAL ===
(iris_username) @keyword.directive
[
(keyword_import)
(keyword_include)
(keyword_includegenerator)
] @keyword.import
[
(keyword_method)
(keyword_classmethod)
] @keyword.function
[
(keyword_class)
(keyword_extends)
(keyword_property)
(keyword_relationship)
(keyword_foreignkey)
(keyword_parameter)
(keyword_projection)
(keyword_index)
(keyword_query)
(keyword_trigger)
(keyword_xdata)
(keyword_storage)
] @keyword.type
[
(method_keyword_codemode_expression)
(call_method_keyword)
(method_keyword)
(class_keywords)
(query_keywords)
(trigger_keyword)
(method_keyword_language)
(relationship_keyword)
(foreignkey_keyword)
(parameter_keyword)
(projection_keyword)
(index_keyword)
(index_keyword_extent)
(xdata_keyword)
(xdata_keyword_mimetype)
(property_keyword)
(keyword_not)
(keyword_references)
(keyword_byref)
(keyword_output)
] @keyword.modifier
(documatic_line) @comment.documentation @spell
[
(query_name)
(trigger_name)
(relationship_name)
(foreignkey_name)
(parameter_name)
(projection_name)
(index_name)
(xdata_name)
(storage_name)
(xml_identifier)
(index_property)
] @variable.member
[
(return_type)
(keyword_list)
(keyword_array)
(parameter_type)
(index_type)
(projection_type)
(property_type)
(index_property_type)
(typename)
] @type.builtin
; === END LOCAL ===

View file

@ -0,0 +1,11 @@
; AUTO-GENERATED by scripts/sync_queries.py
; Edit only the LOCAL section in composed files.
; File: indents.scm
; === BEGIN CORE ===
"{" @indent.begin
"}" @indent.end
; === END CORE ===
; === BEGIN LOCAL ===
; === END LOCAL ===

View file

@ -0,0 +1,189 @@
; AUTO-GENERATED by scripts/sync_queries.py
; Edit only the LOCAL section in composed files.
; File: injections.scm
; === BEGIN CORE ===
(embedded_html
(angled_bracket_fenced_text) @injection.content
(#set! injection.language "html"))
(embedded_sql
(_
(paren_fenced_text) @injection.content)
(#set! injection.language "sql"))
(embedded_js
[
(angled_bracket_fenced_text)
(embedded_js_special_case)
] @injection.content
(#set! injection.language "javascript"))
(embedded_xml
(angled_bracket_fenced_text) @injection.content
(#set! injection.language "xml"))
([
(line_comment_1)
(line_comment_2)
(line_comment_3)
(block_comment)
] @injection.content
(#set! injection.language "comment"))
; === END CORE ===
; === BEGIN LOCAL ===
; Keywords, one of type language = "python", none of type codemode
; External method body injection based on [ Language = ... ]
(method_definition
(external_method_keywords
(method_keyword_language
(typename) @_lang))
(external_method_body_content) @injection.content
(#set! injection.include-children "true")
(#match? @_lang "^[Pp][Yy][Tt][Hh][Oo][Nn]$")
(#set! injection.language "python"))
(method_definition
(external_method_keywords
(method_keyword_language
(typename) @_lang))
(external_method_body_content) @injection.content
(#set! injection.include-children "true")
(#match? @_lang "^[Tt][Ss][Qq][Ll]$")
(#set! injection.language "tsql"))
(method_definition
(external_method_keywords
(method_keyword_language
(typename) @_lang))
(external_method_body_content) @injection.content
(#set! injection.include-children "true")
(#match? @_lang "^[Ii][Ss][Pp][Ll]$")
(#set! injection.language "ispl"))
; External trigger with python body
((trigger
(external_trigger
(trigger_keywords
(method_keyword_language
(typename) @_lang))
(external_method_body_content) @injection.content))
(#set! injection.include-children "true")
(#match? @_lang "^[Pp][Yy][Tt][Hh][Oo][Nn]$")
(#set! injection.language "python"))
; External trigger with TSQL body
((trigger
(external_trigger
(trigger_keywords
(method_keyword_language
(typename) @_lang))
(external_method_body_content) @injection.content))
(#set! injection.include-children "true")
(#match? @_lang "^[Tt][Ss][Qq][Ll]$")
(#set! injection.language "tsql"))
; A query must be of type %SQLQuery to have an SQL body, otherwise the body
; is empty
(query
(return_type
(typename
(identifier) @_querytype
(#match? @_querytype "^%[Ss][Qq][Ll][Qq][Uu][Ee][Rr][Yy]$")))
(query_body
(query_body_content) @injection.content)
(#set! injection.language "sql")
(#set! injection.include-children "true"))
; XDATA blocks:
; - xdata_any requires a keyword list that includes MimeType
; - xdata_xml allows an optional keyword list and defaults to XML
; ----------------------------
; XDATA injections (MimeType)
; ----------------------------
; text/markdown
(xdata
(xdata_any
(xdata_keywords
(xdata_keyword_mimetype
(typename) @_mt))
(external_method_body_content) @injection.content)
(#set! injection.include-children "true")
(#match? @_mt "^\"?text/markdown\"?$")
(#set! injection.language "markdown"))
; XML MimeTypes
(xdata
(xdata_any
(xdata_keywords
(xdata_keyword_mimetype
(typename) @_mt))
(external_method_body_content) @injection.content)
(#set! injection.include-children "true")
(#match? @_mt
"^\"?([Tt][Ee][Xx][Tt]|[Aa][Pp][Pp][Ll][Ii][Cc][Aa][Tt][Ii][Oo][Nn])/[Xx][Mm][Ll]\"?$")
(#set! injection.language "xml"))
; text/html
(xdata
(xdata_any
(xdata_keywords
(xdata_keyword_mimetype
(typename) @_mt))
(external_method_body_content) @injection.content)
(#set! injection.include-children "true")
(#match? @_mt "^\"?text/html\"?$")
(#set! injection.language "html"))
; application/json
(xdata
(xdata_any
(xdata_keywords
(xdata_keyword_mimetype
(typename) @_mt))
(external_method_body_content) @injection.content)
(#set! injection.include-children "true")
(#match? @_mt "^\"?application/json\"?$")
(#set! injection.language "json"))
; text/yaml or application/yaml
(xdata
(xdata_any
(xdata_keywords
(xdata_keyword_mimetype
(typename) @_mt))
(external_method_body_content) @injection.content)
(#set! injection.include-children "true")
(#match? @_mt
"^\"?([Tt][Ee][Xx][Tt]|[Aa][Pp][Pp][Ll][Ii][Cc][Aa][Tt][Ii][Oo][Nn])/[Yy][Aa][Mm][Ll]\"?$")
(#set! injection.language "yaml"))
; text/css
(xdata
(xdata_any
(xdata_keywords
(xdata_keyword_mimetype
(typename) @_mt))
(external_method_body_content) @injection.content)
(#set! injection.include-children "true")
(#match? @_mt "^\"?text/css\"?$")
(#set! injection.language "css"))
; -----------------------------------------
; XDATA default (no MimeType): XML fallback
; -----------------------------------------
(xdata
(xdata_xml
(xdata_keywords)?
(external_method_body_content) @injection.content)
(#set! injection.include-children "true")
(#set! injection.language "xml"))
; Storage definition is XML
(storage
(storage_body
(external_method_body_content) @injection.content)
(#set! injection.language "xml")
(#set! injection.include-children "true"))
; === END LOCAL ===