Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the spread ... operator, other new functions, and indices on lambdas #13658

Merged
merged 5 commits into from
Apr 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address PR feedback
  • Loading branch information
anthony-c-martin committed Apr 23, 2024
commit 880e364d6958e1e6601b5977a7f8cac899cdb087
4 changes: 2 additions & 2 deletions src/Bicep.Core/Parsing/BaseParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ private SyntaxBase ArrayElement()

if (current.Type == TokenType.Ellipsis)
{
return SpreadExpression([TokenType.NewLine, TokenType.RightSquare]);
return SpreadExpression([TokenType.Comma, TokenType.NewLine, TokenType.RightSquare]);
}

var value = this.Expression(ExpressionFlags.AllowComplexLiterals);
Expand Down Expand Up @@ -1106,7 +1106,7 @@ private SyntaxBase ObjectElement(ExpressionFlags expressionFlags)

if (current.Type == TokenType.Ellipsis)
{
return SpreadExpression([TokenType.NewLine, TokenType.RightBrace]);
return SpreadExpression([TokenType.Comma, TokenType.NewLine, TokenType.RightBrace]);
}

var key = this.WithRecovery(
Expand Down
Loading