-
Notifications
You must be signed in to change notification settings - Fork 35
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
Duplicated AST label upon nested ·ls #20
Comments
This means an attempt to overwrite an index when your AST is under construction. What are you aiming to parse? |
I'm trying to macro the individual elements of an array. So my first line of thought was that there should be an ·ls for the array itself, and another ·ls to parse the structures of a single element. e.g. [ , , ] Also, may I ask what ·ls stands for? |
So you want a macro that allows an alternative syntax for arrays, like macro { [ ···array ] } >> { [ ·sekjun9878_array_expander(···array) ] } Within But first we need to add some form of DI here https://github.com/marcioAlmada/yay/blob/master/src/Macro.php#L579, so custom expanders can be recognized by the macro interpreter. This is listed on the roadmap (issue #3) as "Support user defined parsers and expanders (add proper D.I for DSL lookups)". |
Should this be closed? |
Hello,
When I attempt to use a nested ·ls(), I get a "Duplicated AST label ·array". What does that error mean and is ·ls supposed to be allowed to be nested? Or am I understanding it wrong?
The text was updated successfully, but these errors were encountered: