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

globalize macros #2

Closed
truj opened this issue Jan 10, 2019 · 1 comment
Closed

globalize macros #2

truj opened this issue Jan 10, 2019 · 1 comment

Comments

@truj
Copy link
Owner

truj commented Jan 10, 2019

Add a pre-parsing run to the MidicaPL parser, only for parsing MACRO definitions.
Then a macro can be called before it is defined.

@truj
Copy link
Owner Author

truj commented Jan 24, 2019

Probably we need more than 2 parsing runs.
At least the chords should be parsed before so that a not-existing chord definition inside of a macro is no problem.
As a side effect, the chord definitions will also be allowed after usage.
Also the first instrument block has to be parsed before the macros.
That's needed in order to detect the usage of undefined channel numbers inside or outside of macros.
All following instrument blocks must be parsed later in order to continue supporting instrument changes.
DEFINE commands must be parsed before everything else.

@truj truj closed this as completed in 25dc154 Jan 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant