Skip to content

Commit

Permalink
fix(go): String scoping no longer scopes parts of imports/field decl.
Browse files Browse the repository at this point in the history
An actually normal bug... See the diff in snapshots for what this means
  • Loading branch information
alexpovel committed Jul 27, 2024
1 parent 24ae07f commit f4796c0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/scoping/langs/go.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ impl From<PreparedGoQuery> for TSQuery {
[
(raw_string_literal)
(interpreted_string_literal)
(import_spec (interpreted_string_literal) @{0})
(field_declaration tag: (raw_string_literal) @{0})
(import_spec (interpreted_string_literal)) @{0}
(field_declaration tag: (raw_string_literal)) @{0}
]
@string",
IGNORE
Expand Down
12 changes: 0 additions & 12 deletions tests/langs/snapshots/r#mod__langs__base.go_strings.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,6 @@
source: tests/langs/mod.rs
expression: inscope_parts
---
- n: 9
l: "\tu \"net/url\"\n"
m: " ^^ "
- n: 47
l: "\tName string `json:\"name,omitempty\" db:\"name\"`\n"
m: " ^^^^^^^^^^^^^^^^^^^^^ "
- n: 48
l: "\tInput interface{} `json:\"input\" db:\"input\"`\n"
m: " ^^^^^^^^^^^^^^^^^^^^^ "
- n: 49
l: "\tExpected interface{} `json:\"expected\" db:\"expected\"`\n"
m: " ^^^^^^^^^^^^^^^^^^^^^ "
- n: 108
l: "\t\tfmt.Println(\"Cleanup after tests\")\n"
m: " ^^^^^^^^^^^^^^^^^^^^^^^ "
Expand Down

0 comments on commit f4796c0

Please sign in to comment.