File tree Expand file tree Collapse file tree
packages/lib-common/src/scopeSupportFacets
fixtures/scopes/typescript.core/statement Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,7 +261,6 @@ export const javascriptCoreScopeSupport: LanguageScopeSupportFacetMap = {
261261 "branch.loop.iteration" : notApplicable ,
262262
263263 // Miscellaneous
264- "statement.misc" : notApplicable ,
265264 environment : notApplicable ,
266265 selector : notApplicable ,
267266 unit : notApplicable ,
@@ -352,5 +351,6 @@ export const javascriptScopeSupport: LanguageScopeSupportFacetMap = {
352351 "argument.actual.enum.iteration" : notApplicable ,
353352
354353 // Miscellaneous
354+ "statement.misc" : notApplicable ,
355355 "statement.package" : notApplicable ,
356356} ;
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ export const typescriptScopeSupport: LanguageScopeSupportFacetMap = {
5454 "statement.iteration.interface" : supported ,
5555 "statement.typeAlias" : supported ,
5656 "statement.method.interface" : supported ,
57+ "statement.misc" : supported ,
5758
5859 "value.typeAlias" : supported ,
5960 "value.field.enum" : supported ,
Original file line number Diff line number Diff line change 1+ declare module "foo" {}
2+ ---
3+
4+ [Content] =
5+ [Removal] =
6+ [Domain] = 0:0-0:23
7+ >-----------------------<
8+ 0| declare module "foo" {}
9+
10+ [Insertion delimiter] = "\n"
Original file line number Diff line number Diff line change 3636 ;; This is disabled since we want the whole statement and not just the block
3737 ;; (statement_block)
3838 ] @statement
39- (#not-parent-type? @statement export_statement)
39+ (#not-parent-type? @statement export_statement ambient_declaration )
4040)
4141
4242(
Original file line number Diff line number Diff line change 22;; `javascript.jsx.scm`, and tree-sitter would complain because those node
33;; types are not defined in the typescript grammar.
44
5+ ;; https://github.com/tree-sitter/tree-sitter-typescript/blob/4ad3010c91d700026d036b5230e2d99ba94ae8a4/typescript/src/grammar.json
6+
57;; import javascript.core.scm
68
79;; !! class Foo { bar(); }
514516 (module)
515517 (type_alias_declaration)
516518 ] @statement
517- (#not-parent-type? @statement export_statement)
519+ (#not-parent-type? @statement export_statement ambient_declaration )
518520)
519521
520522;; Statements with optional trailing `;`
You can’t perform that action at this time.
0 commit comments