From b9173266f7430d905bed724ebae43bf68cdf0ba5 Mon Sep 17 00:00:00 2001 From: Hannah Date: Mon, 30 Mar 2026 12:38:42 -0400 Subject: [PATCH] chore: update commit and highlights to most recent version --- lua/nvim-treesitter/parsers.lua | 4 +- .../objectscript_routine/highlights.scm | 8 ++- .../queries/objectscript_routine/indents.scm | 8 +++ .../objectscript_routine/injections.scm | 8 +++ .../queries/objectscript_udl/highlights.scm | 16 +++++- runtime/queries/objectscript_udl/indents.scm | 8 +++ .../queries/objectscript_udl/injections.scm | 56 +++++++++++++++---- 7 files changed, 88 insertions(+), 20 deletions(-) diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 184eebada..0779734be 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1501,7 +1501,7 @@ return { objectscript_routine = { install_info = { location = 'objectscript_routine', - revision = 'a60196ecc4e6d492510a0eb0374e74020895b917', + revision = 'f1c568c622a0a43191563fd4c5e649a61eef11cc', url = 'https://github.com/intersystems/tree-sitter-objectscript', }, maintainers = { '@davem-intersys', '@hkimura-intersys' }, @@ -1510,7 +1510,7 @@ return { objectscript_udl = { install_info = { location = 'udl', - revision = 'a60196ecc4e6d492510a0eb0374e74020895b917', + revision = 'f1c568c622a0a43191563fd4c5e649a61eef11cc', url = 'https://github.com/intersystems/tree-sitter-objectscript', }, maintainers = { '@davem-intersys', '@hkimura-intersys' }, diff --git a/runtime/queries/objectscript_routine/highlights.scm b/runtime/queries/objectscript_routine/highlights.scm index 2e8b5ff92..7ba421bde 100644 --- a/runtime/queries/objectscript_routine/highlights.scm +++ b/runtime/queries/objectscript_routine/highlights.scm @@ -117,7 +117,6 @@ "'?" "!" "?" - "--" ] @operator (bracket) @punctuation.bracket @@ -192,8 +191,7 @@ (keyword_public) (keyword_private) (keyword_methodimpl) - (open_keywords) - (use_keywords) + (device_keywords) (close_parameter_option_value) (keyword_clear) (keyword_on) @@ -274,6 +272,8 @@ (command_break) ] @comment +"--" @operator + ; === END CORE === ; === BEGIN LOCAL === (routine_type) @type.builtin @@ -282,4 +282,6 @@ (routine) @keyword.type +(compiled_header) @markup.heading + ; === END LOCAL === diff --git a/runtime/queries/objectscript_routine/indents.scm b/runtime/queries/objectscript_routine/indents.scm index a49aa039e..ce0f064b2 100644 --- a/runtime/queries/objectscript_routine/indents.scm +++ b/runtime/queries/objectscript_routine/indents.scm @@ -1,3 +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 === diff --git a/runtime/queries/objectscript_routine/injections.scm b/runtime/queries/objectscript_routine/injections.scm index c6bfab662..70529732b 100644 --- a/runtime/queries/objectscript_routine/injections.scm +++ b/runtime/queries/objectscript_routine/injections.scm @@ -1,3 +1,7 @@ +; 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")) @@ -25,3 +29,7 @@ (block_comment) ] @injection.content (#set! injection.language "comment")) + +; === END CORE === +; === BEGIN LOCAL === +; === END LOCAL === diff --git a/runtime/queries/objectscript_udl/highlights.scm b/runtime/queries/objectscript_udl/highlights.scm index a7539a13f..454e195a1 100644 --- a/runtime/queries/objectscript_udl/highlights.scm +++ b/runtime/queries/objectscript_udl/highlights.scm @@ -1,3 +1,7 @@ +; AUTO-GENERATED by scripts/sync_queries.py +; Edit only the LOCAL section in composed files. +; File: highlights.scm +; === BEGIN EXPR === (pattern_expression) @string.regexp [ @@ -113,11 +117,12 @@ "'?" "!" "?" - "--" ] @operator (bracket) @punctuation.bracket +; === END EXPR === +; === BEGIN CORE === (macro_arg) @variable.member (macro_value) @constant.builtin @@ -186,8 +191,7 @@ (keyword_public) (keyword_private) (keyword_methodimpl) - (open_keywords) - (use_keywords) + (device_keywords) (close_parameter_option_value) (keyword_clear) (keyword_on) @@ -268,6 +272,10 @@ (command_break) ] @comment +"--" @operator + +; === END CORE === +; === BEGIN LOCAL === (iris_username) @keyword.directive [ @@ -346,3 +354,5 @@ (index_property_type) (typename) ] @type.builtin + +; === END LOCAL === diff --git a/runtime/queries/objectscript_udl/indents.scm b/runtime/queries/objectscript_udl/indents.scm index a49aa039e..ce0f064b2 100644 --- a/runtime/queries/objectscript_udl/indents.scm +++ b/runtime/queries/objectscript_udl/indents.scm @@ -1,3 +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 === diff --git a/runtime/queries/objectscript_udl/injections.scm b/runtime/queries/objectscript_udl/injections.scm index 0307dbcee..3289fa70c 100644 --- a/runtime/queries/objectscript_udl/injections.scm +++ b/runtime/queries/objectscript_udl/injections.scm @@ -1,3 +1,7 @@ +; 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")) @@ -26,13 +30,17 @@ ] @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") - (#any-of? @_lang "python" "Python" "PYTHON") + (#match? @_lang "^[Pp][Yy][Tt][Hh][Oo][Nn]$") (#set! injection.language "python")) (method_definition @@ -41,7 +49,7 @@ (typename) @_lang)) (external_method_body_content) @injection.content (#set! injection.include-children "true") - (#any-of? @_lang "tsql" "TSQL" "tSQL" "tSql" "TSql") + (#match? @_lang "^[Tt][Ss][Qq][Ll]$") (#set! injection.language "tsql")) (method_definition @@ -50,9 +58,10 @@ (typename) @_lang)) (external_method_body_content) @injection.content (#set! injection.include-children "true") - (#any-of? @_lang "ispl" "ISPL" "ISpl" "iSpl") + (#match? @_lang "^[Ii][Ss][Pp][Ll]$") (#set! injection.language "ispl")) +; External trigger with python body ((trigger (external_trigger (trigger_keywords @@ -60,9 +69,10 @@ (typename) @_lang)) (external_method_body_content) @injection.content)) (#set! injection.include-children "true") - (#any-of? @_lang "python" "Python" "PYTHON") + (#match? @_lang "^[Pp][Yy][Tt][Hh][Oo][Nn]$") (#set! injection.language "python")) +; External trigger with TSQL body ((trigger (external_trigger (trigger_keywords @@ -70,19 +80,28 @@ (typename) @_lang)) (external_method_body_content) @injection.content)) (#set! injection.include-children "true") - (#any-of? @_lang "tsql" "TSQL" "tSQL" "tSql" "TSql") + (#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 - (#any-of? @_querytype "%SqlQuery" "%sqlquery" "%SQLQUERY" "%Sqlquery" "%SQLQuery"))) + (#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 @@ -90,9 +109,10 @@ (typename) @_mt)) (external_method_body_content) @injection.content) (#set! injection.include-children "true") - (#any-of? @_mt "text/markdown" "\"text/markdown\"") + (#match? @_mt "^\"?text/markdown\"?$") (#set! injection.language "markdown")) +; XML MimeTypes (xdata (xdata_any (xdata_keywords @@ -100,9 +120,11 @@ (typename) @_mt)) (external_method_body_content) @injection.content) (#set! injection.include-children "true") - (#any-of? @_mt "text/xml" "\"text/xml\"" "application/xml" "\"application/xml\"") + (#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 @@ -110,9 +132,10 @@ (typename) @_mt)) (external_method_body_content) @injection.content) (#set! injection.include-children "true") - (#any-of? @_mt "text/html" "\"text/html\"") + (#match? @_mt "^\"?text/html\"?$") (#set! injection.language "html")) +; application/json (xdata (xdata_any (xdata_keywords @@ -120,9 +143,10 @@ (typename) @_mt)) (external_method_body_content) @injection.content) (#set! injection.include-children "true") - (#any-of? @_mt "application/json" "\"application/json\"") + (#match? @_mt "^\"?application/json\"?$") (#set! injection.language "json")) +; text/yaml or application/yaml (xdata (xdata_any (xdata_keywords @@ -130,9 +154,11 @@ (typename) @_mt)) (external_method_body_content) @injection.content) (#set! injection.include-children "true") - (#any-of? @_mt "text/yaml" "\"text/yaml\"" "application/yaml" "\"application/yaml\"") + (#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 @@ -140,9 +166,12 @@ (typename) @_mt)) (external_method_body_content) @injection.content) (#set! injection.include-children "true") - (#any-of? @_mt "text/css" "\"text/css\"") + (#match? @_mt "^\"?text/css\"?$") (#set! injection.language "css")) +; ----------------------------------------- +; XDATA default (no MimeType): XML fallback +; ----------------------------------------- (xdata (xdata_xml (xdata_keywords)? @@ -150,8 +179,11 @@ (#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 ===