@@ -28,6 +28,8 @@ source_file
2828
2929top_level
3030 body:
31+ block
32+ stmt: unsupported_node "let xs = [1, 2, 3]"
3133
3234===
3335Empty array literal with type
@@ -68,6 +70,8 @@ source_file
6870
6971top_level
7072 body:
73+ block
74+ stmt: unsupported_node "let xs: [Int] = []"
7175
7276===
7377Dictionary literal
@@ -106,6 +110,8 @@ source_file
106110
107111top_level
108112 body:
113+ block
114+ stmt: unsupported_node "let d = [\"a\": 1, \"b\": 2]"
109115
110116===
111117Set literal
@@ -155,6 +161,8 @@ source_file
155161
156162top_level
157163 body:
164+ block
165+ stmt: unsupported_node "let s: Set<Int> = [1, 2, 3]"
158166
159167===
160168Tuple literal
@@ -191,6 +199,8 @@ source_file
191199
192200top_level
193201 body:
202+ block
203+ stmt: unsupported_node "let t = (1, \"two\", 3.0)"
194204
195205===
196206Subscript access
@@ -232,9 +242,8 @@ source_file
232242
233243top_level
234244 body:
235- unsupported_node "// TODO: tree-sitter-swift parses `xs[0]` as a call_expression (same shape"
236- unsupported_node "// as `xs(0)`), so the mapping currently produces a call_expr. Update the"
237- unsupported_node "// parser / add a separate subscript_expr node and remap when fixed."
245+ block
246+ stmt: unsupported_node "let first = xs[0]"
238247
239248===
240249Dictionary subscript
@@ -276,8 +285,8 @@ source_file
276285
277286top_level
278287 body:
279- unsupported_node "// TODO: same parser issue as the array subscript case above —"
280- unsupported_node "// `d[\"key\"]` is parsed as `call_expression(d, ( \"key\"))`. "
288+ block
289+ stmt: unsupported_node "let v = d[ \"key\"] "
281290
282291===
283292Tuple member access
@@ -309,3 +318,5 @@ source_file
309318
310319top_level
311320 body:
321+ block
322+ stmt: unsupported_node "let n = t.0"
0 commit comments