mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-13 23:11:10 +00:00
fix: split duplicate value field in Dart tree-sitter query pattern
This commit is contained in:
parent
52c2574bec
commit
8e8589b5e8
2 changed files with 20 additions and 1 deletions
|
|
@ -257,4 +257,18 @@ class StringBuilder {
|
|||
it("should handle static methods and properties", () => {
|
||||
expect(parseResult).toMatch(/static double circleArea/)
|
||||
})
|
||||
|
||||
it("should parse variable initialization with identifier reference", () => {
|
||||
expect(parseResult).toMatch(/var instance = MyClass/)
|
||||
expect(parseResult).toMatch(/var status = Status/)
|
||||
})
|
||||
|
||||
it("should parse variable initialization with method calls", () => {
|
||||
expect(parseResult).toMatch(/var logger = LoggerFactory\.create\(\)/)
|
||||
})
|
||||
|
||||
it("should parse reference patterns", () => {
|
||||
expect(parseResult).toMatch(/instance\.greet/)
|
||||
expect(parseResult).toMatch(/status\.displayName/)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -70,9 +70,14 @@ export default `
|
|||
(new_expression
|
||||
(type_identifier) @name) @reference.class
|
||||
|
||||
; Variables initialized with identifier reference
|
||||
(initialized_variable_definition
|
||||
name: (identifier)
|
||||
value: (identifier) @name) @reference.class
|
||||
|
||||
; Variables initialized with selector/method call
|
||||
(initialized_variable_definition
|
||||
name: (identifier)
|
||||
value: (identifier) @name
|
||||
value: (selector
|
||||
"!"?
|
||||
(argument_part
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue