Skip to content

Commit

Permalink
fix(parser): comma between list items is not optional
Browse files Browse the repository at this point in the history
  • Loading branch information
martinohmann committed Oct 7, 2022
1 parent 9ff1894 commit 9d97a02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser/grammar/hcl.pest
Expand Up @@ -44,7 +44,7 @@ Decimal = { '0'..'9' }

// Collection values
CollectionValue = _{ Tuple | Object }
Tuple = { "[" ~ (Expression ~ (","? ~ Expression)* ~ ","?)? ~ "]" }
Tuple = { "[" ~ (Expression ~ ("," ~ Expression)* ~ ","?)? ~ "]" }
Object = { "{" ~ (ObjectItem ~ (","? ~ ObjectItem)* ~ ","?)? ~ "}" }
ObjectItem = _{ ObjectItemIdent | ObjectItemExpr }
ObjectItemIdent = _{ Identifier ~ ("=" | ":") ~ Expression }
Expand Down

0 comments on commit 9d97a02

Please sign in to comment.