fix: Handle parsing corner cases (#309)

A block with a single or expression needs to be treated as a comprehension instead of a
set/array with 1 item. e.g.: {1 | 1 }, [2 | foo]

Allow successfully parsing object comprehensions as rule body
x if { 1:2 | 1 }

fixes #306, fixes #307

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2024-09-04 10:02:14 -07:00
committed by GitHub
parent a4a80d7fc6
commit 8003cfc5b7
3 changed files with 63 additions and 0 deletions
+1
View File
@@ -227,3 +227,4 @@ v1/uuid
v1/varreferences
v1/virtualdocs
v1/walkbuiltin
v1/withkeyword