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

Make macros syntax error instead of silently failing. Thanks @marcioA… #68

Merged
merged 2 commits into from
Apr 26, 2019

Conversation

ircmaxell
Copy link
Owner

…lmada via #61:

@@ -112,7 +113,7 @@ $(macro) {

$(macro) {
compile {
function $(llvmidentifier() as name) ($(optional(ls(
function $(llvmidentifier() as name) $! ($(optional(ls(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be breaking function calls with no arguments

compile {
     foo($x);
}

works

compile {
     foo();
}

gives me a fatal error/throws a runtime exception in the docker image.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That line shouldn't trigger that error, since there is no function keyword... It would trigger the other instance though...

Fixed, with test added.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right, I commented on the wrong line

@driusan driusan merged commit ed51e44 into master Apr 26, 2019
@ircmaxell ircmaxell deleted the error_on_macro_syntax_error branch April 26, 2019 17:04
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

Successfully merging this pull request may close these issues.

2 participants