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

Empty attribute syntax is ambiguous #59

Closed
lambda-fairy opened this issue Nov 12, 2016 · 1 comment
Closed

Empty attribute syntax is ambiguous #59

lambda-fairy opened this issue Nov 12, 2016 · 1 comment
Labels

Comments

@lambda-fairy
Copy link
Owner

lambda-fairy commented Nov 12, 2016

After writing #44 (comment), I realized the same argument applies to the empty attribute syntax.

That is, given the tokens div contenteditable ? (foo) , it's ambiguous whether foo toggles the contenteditable attribute, or is the body of the div.

One possible fix is to swap the tokens around: div contenteditable(foo)?. This reminds me of Rust's ? operator, which is nice. On the other hand this new syntax doesn't look much like an attribute.

@lambda-fairy
Copy link
Owner Author

lambda-fairy commented Nov 24, 2016

The new syntax is div contenteditable?[foo], where "contenteditable" is the attribute name and "foo" is a boolean expression.

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