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

Adding while and until to the list of start block keywords in the parser #802

Closed
wants to merge 2 commits into from

Conversation

camertron
Copy link

Currently while and until aren't identified as keywords by the haml parser.

@mattwildig
Copy link
Contributor

I’m not sure this is needed – while and until don’t have anything like elsif or rescue like if and begin do (at least not as far as I know), so managing the indentation and adding the final end is straightforward. Do you have any test cases where this is causing problems? Perhaps we just need better names and comments in the code to explain what’s happening.

@camertron
Copy link
Author

I was having trouble identifying when a bit of code needed an end statement when walking a haml parse tree. Perhaps you could explain how the haml gem does it? I think the only thing this change does is set the keyword variable in ParseNode instances, so it's pretty benign even if it's not strictly necessary.

@k0kubun
Copy link
Member

k0kubun commented Apr 15, 2017

We need test cases for this. What you expect for templates including those keywords is not clear. Please add them.

And since it has conflicts and passed 2-3 years, closing for now. Please reopen this if you still have this problem.

@k0kubun k0kubun closed this Apr 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants