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

Make the language newline insensitive #11091

Open
shenglol opened this issue Jun 29, 2023 · 0 comments
Open

Make the language newline insensitive #11091

shenglol opened this issue Jun 29, 2023 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@shenglol
Copy link
Contributor

I believe it is necessary to reassess the decision of making the Bicep language fully newline insensitive in the long run. The recent fixes we implemented for specific syntax issues, such as #586 and #5829, were temporary patches that lack flexibility. While allowing newlines before the ? and : in a ternary operator is permitted, parsing errors still arise when newlines are introduced after them. This issue extends to other syntaxes such as lambdas and for-expressions, requiring additional manual patches to the parser and resulting in heightened fragility.

Although the original intention behind making Bicep newline sensitive was to simplify error recovery logic and enhance error messages, it is still possible to develop a recursive descent parser that handles a newline-insensitive grammar while providing informative error messages. However, implementing such changes could be disruptive and time-consuming. It would require careful consideration and significant effort to achieve the desired outcome.

@shenglol shenglol added the enhancement New feature or request label Jun 29, 2023
@ghost ghost added the Needs: Triage 🔍 label Jun 29, 2023
@stephaniezyen stephaniezyen added this to the v1.0 milestone Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants