Skip to content

Commit

Permalink
Add spread & multiline objects + arrays to grammar (#14983)
Browse files Browse the repository at this point in the history
Closes #14947
  • Loading branch information
anthony-c-martin authored Sep 5, 2024
1 parent 0a3877c commit 38ccfcc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/grammar.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,14 @@ multilineString -> "'''" + MULTILINESTRINGCHAR+ + "'''"
literalValue -> NUMBER | "true" | "false" | "null"
object -> "{" ( NL+ ( objectProperty NL+ )* )? "}"
objectProperty -> ( IDENTIFIER(name) | interpString ) ":" expression
array -> "[" ( NL+ arrayItem* )? "]"
arrayItem -> expression NL+
object -> "{" NL? ( | ( objectProperty ( objectSep objectProperty )* ( | objectSep ) ) ) "}"
objectSep -> "," | NL
objectKey -> IDENTIFIER(name) | interpString
objectProperty -> ( objectKey ":" expression ) | ( "..." expression )
array -> "[" NL? ( | ( arrayItem ( arraySep arrayItem )* ( | arraySep ) ) ) "]"
arraySep -> "," | NL
arrayItem -> expression | ( "..." expression )
typeExpression ->
singularTypeExpression |
Expand Down

0 comments on commit 38ccfcc

Please sign in to comment.