mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 19:30:02 -04:00
Add support for Java records
Ref: https://github.com/tree-sitter/tree-sitter-java/pull/73
This commit is contained in:
parent
8ccd808035
commit
7e9e8f2af9
2 changed files with 7 additions and 0 deletions
|
|
@ -83,6 +83,8 @@
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
(class_declaration
|
(class_declaration
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
|
(record_declaration
|
||||||
|
name: (identifier) @type)
|
||||||
(enum_declaration
|
(enum_declaration
|
||||||
name: (identifier) @type)
|
name: (identifier) @type)
|
||||||
(constructor_declaration
|
(constructor_declaration
|
||||||
|
|
@ -152,6 +154,7 @@
|
||||||
"assert"
|
"assert"
|
||||||
"break"
|
"break"
|
||||||
"class"
|
"class"
|
||||||
|
"record"
|
||||||
"continue"
|
"continue"
|
||||||
"default"
|
"default"
|
||||||
"enum"
|
"enum"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@
|
||||||
(program) @scope
|
(program) @scope
|
||||||
(class_declaration
|
(class_declaration
|
||||||
body: (_) @scope)
|
body: (_) @scope)
|
||||||
|
(record_declaration
|
||||||
|
body: (_) @scope)
|
||||||
(enum_declaration
|
(enum_declaration
|
||||||
body: (_) @scope)
|
body: (_) @scope)
|
||||||
(lambda_expression) @scope
|
(lambda_expression) @scope
|
||||||
|
|
@ -42,6 +44,8 @@
|
||||||
(identifier) @definition.namespace)
|
(identifier) @definition.namespace)
|
||||||
(class_declaration
|
(class_declaration
|
||||||
name: (identifier) @definition.type)
|
name: (identifier) @definition.type)
|
||||||
|
(record_declaration
|
||||||
|
name: (identifier) @definition.type)
|
||||||
(enum_declaration
|
(enum_declaration
|
||||||
name: (identifier) @definition.enum)
|
name: (identifier) @definition.enum)
|
||||||
(method_declaration
|
(method_declaration
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue