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

Brackets are not always balanced correctly in code executed at a state #41

Closed
ghost opened this issue May 4, 2011 · 4 comments
Closed
Labels

Comments

@ghost
Copy link

ghost commented May 4, 2011

It appears that if there are extra brackets at the end of code executed when a state is reached, even if they are properly balanced, they are not parsed correctly unless there is a space before them.

e.g.

TEST
    :
        {{if(true); else {} }}
    ;

works, but

TEST
    :
        {{if(true); else {}}}
    ;

results in a parse error.

Cheers,

Marcus.

@zaach
Copy link
Owner

zaach commented May 4, 2011

We don't currently match braces, rather, we match everything between a set of double braces, but I can add a special case to deal with this.

@ghost
Copy link
Author

ghost commented May 4, 2011

Right. It's probably not massively important, but I think just counting opening/closing brackets would suffice. That will work for properly-formed JavaScript, and may fail for mal-formed JavaScript, which is what you'd want anyway.

@zaach
Copy link
Owner

zaach commented May 10, 2011

Fixed 7108967#diff-1

Now it parses balanced braces so you won't need double braces

@zaach zaach closed this as completed May 10, 2011
@ghost
Copy link
Author

ghost commented May 10, 2011

Great, thanks. I'll try it out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant