Skip to content

Commit 99b61a6

Browse files
committed
add list scope
1 parent cc21de2 commit 99b61a6

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
final list = [1,2,3];
2+
---
3+
4+
[Content] =
5+
[Domain] = 0:13-0:20
6+
>-------<
7+
0| final list = [1,2,3];
8+
9+
[Removal] = 0:12-0:20
10+
>--------<
11+
0| final list = [1,2,3];
12+
13+
[Leading delimiter] = 0:12-0:13
14+
>-<
15+
0| final list = [1,2,3];
16+
17+
[Insertion delimiter] = " "

data/playground/dart.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
foo() {
22
if (true) { }
3+
4+
final list = [1,2,3];
35
}

packages/common/src/scopeSupportFacets/dart.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel;
66

77
export const dartScopeSupport: LanguageScopeSupportFacetMap = {
88
ifStatement: supported,
9+
list: supported,
910
};

queries/dart.scm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,10 @@
22
;;!! if () {}
33
;;! ^^^^^^^^
44
(if_statement) @ifStatement
5+
6+
;;!! [ 0 ]
7+
;;! ^^^^^
8+
[
9+
(list_literal)
10+
(list_pattern)
11+
] @list

0 commit comments

Comments
 (0)