aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/queries
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2025-08-01 18:15:49 +0200
committerChristian Clason <ch.clason+github@icloud.com>2025-08-05 20:06:15 +0200
commit05f29103552dcdd7faa77ce7c5152759c733f988 (patch)
treea78b06223f15c7aaf147d4a244b8fe02fe123150 /runtime/queries
parentfeat(parsers): update ada, fortran, idl, javadoc, matlab, nim, powershell, sl... (diff)
downloadnvim-treesitter-05f29103552dcdd7faa77ce7c5152759c733f988.tar
nvim-treesitter-05f29103552dcdd7faa77ce7c5152759c733f988.tar.gz
nvim-treesitter-05f29103552dcdd7faa77ce7c5152759c733f988.tar.bz2
nvim-treesitter-05f29103552dcdd7faa77ce7c5152759c733f988.tar.lz
nvim-treesitter-05f29103552dcdd7faa77ce7c5152759c733f988.tar.xz
nvim-treesitter-05f29103552dcdd7faa77ce7c5152759c733f988.tar.zst
nvim-treesitter-05f29103552dcdd7faa77ce7c5152759c733f988.zip
feat(systemverilog)!: update parser and queries
Breaking changes: 1. `(comment)` node split into `(one_line_comment)` and `(block_comment)` 2. named `(directive_foo)` nodes replaced by anonymous `"'foo"` (with backtick!) nodes -- but not consistently
Diffstat (limited to 'runtime/queries')
-rw-r--r--runtime/queries/systemverilog/highlights.scm32
-rw-r--r--runtime/queries/systemverilog/injections.scm5
2 files changed, 20 insertions, 17 deletions
diff --git a/runtime/queries/systemverilog/highlights.scm b/runtime/queries/systemverilog/highlights.scm
index 1e004ef76..21542941f 100644
--- a/runtime/queries/systemverilog/highlights.scm
+++ b/runtime/queries/systemverilog/highlights.scm
@@ -234,10 +234,13 @@
[
"include"
"import"
- "directive_include"
+ "`include"
] @keyword.import
-(comment) @comment @spell
+[
+ (one_line_comment)
+ (block_comment)
+] @comment @spell
[
"@"
@@ -300,9 +303,6 @@ port_name: (simple_identifier) @variable
(net_decl_assignment
(simple_identifier) @variable)
-(ERROR
- (simple_identifier) @variable)
-
; variable.member
(hierarchical_identifier
(simple_identifier)
@@ -570,17 +570,17 @@ c_name: (c_identifier) @function
; directive
[
- "directive_define"
- "directive_default_nettype"
- "directive_resetall"
- "directive_timescale"
- "directive_undef"
- "directive_undefineall"
- "directive_ifdef"
- "directive_ifndef"
- "directive_elsif"
- "directive_endif"
- "directive_else"
+ "`define"
+ "`default_nettype"
+ (resetall_compiler_directive)
+ "`timescale"
+ "`undef"
+ (undefineall_compiler_directive)
+ "`ifdef"
+ "`ifndef"
+ "`elsif"
+ "`endif"
+ "`else"
] @keyword.directive.define
(include_compiler_directive
diff --git a/runtime/queries/systemverilog/injections.scm b/runtime/queries/systemverilog/injections.scm
index 05aa24d8f..a6f3ca45e 100644
--- a/runtime/queries/systemverilog/injections.scm
+++ b/runtime/queries/systemverilog/injections.scm
@@ -1,4 +1,7 @@
-((comment) @injection.content
+([
+ (one_line_comment)
+ (block_comment)
+] @injection.content
(#set! injection.language "comment"))
((macro_text) @injection.content