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

value and name of backed enums #1012

Open
SlowFox71 opened this issue May 6, 2024 · 2 comments
Open

value and name of backed enums #1012

SlowFox71 opened this issue May 6, 2024 · 2 comments

Comments

@SlowFox71
Copy link

As far as I can see, there is no support for things like:

<option id="{MyEnum::Foo->name}">{MyEnum::Foo->value}</option>

My last experience with parsers is more than a decade ago, and I didn't take the time to fully understand TemplateParser.y, but something like

static_class_access(res)       ::= ID(v) PTR ID(n). {
    res = array(v, '->'.n);
}   

IMO should do the trick.

@t-bey
Copy link

t-bey commented Sep 11, 2024

This would be really useful to implement.

@Mattie112
Copy link

Yes I also run into this. Just to be clear, the error is in this case:

- Unexpected "->", expected one of: "","" , ")" <-- 

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

No branches or pull requests

3 participants