Skip to content

Commit

Permalink
tests: Maps
Browse files Browse the repository at this point in the history
  • Loading branch information
obiwac committed Oct 1, 2024
1 parent ab64510 commit 3774af8
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions test/corpus/map.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
===
Map literals
===

{}
{
"key": 1
}
{
"key": 1,
"key2": 2,
}
return {}
return {"key": 1}

---

(source_file
(statement
(expression
(map)
)
)
(statement
(expression
(map
(map_item
key: (expression
(literal
(string)
)
)
value: (expression
(literal
(number)
)
)
)
)
)
)
(statement
(expression
(map
(map_item
key: (expression
(literal
(string)
)
)
value: (expression
(literal
(number)
)
)
)
(map_item
key: (expression
(literal
(string)
)
)
value: (expression
(literal
(number)
)
)
)
)
)
)
(statement
(return
rv: (expression
(map)
)
)
)
(statement
(return
rv: (expression
(map
(map_item
key: (expression
(literal
(string)
)
)
value: (expression
(literal
(number)
)
)
)
)
)
)
)
)

0 comments on commit 3774af8

Please sign in to comment.