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 #defines are not ignored when checking syntax. #36

Closed
agatti opened this issue Apr 25, 2015 · 4 comments
Closed

Empty #defines are not ignored when checking syntax. #36

agatti opened this issue Apr 25, 2015 · 4 comments

Comments

@agatti
Copy link

agatti commented Apr 25, 2015

As per subject, here's an example that triggers a syntax error:

#define DUMMY
attribute DUMMY vec4 vector;

yields a "Missing ';' after declaration" at the beginning of vec4 error.

@AbigailBuccaneer
Copy link
Collaborator

This was fixed by ca5372f, which will be in the next release. It currently just accepts all preprocessor tokens until the end of the line (which does mean it accepts some invalid inputs, but it's a start).

@AbigailBuccaneer
Copy link
Collaborator

Wait, my mistake, I've potentially misunderstood this.

Is the bug that in the current release it doesn't correctly parse the #define directive (and so eats a token from the next line) or that it doesn't support preprocessor token replacement? If it's the latter, that's going to be part of a larger task which I mentioned in #32.

@agatti
Copy link
Author

agatti commented Apr 26, 2015

I assume it's the latter, so I guess it's part of #32 then. If so, then feel free to close this bug. All my shaders have a

#ifdef GL_ES
#define LOW lowp
#define MED mediump
#define HIGH highp
precision mediump float;
#else
#define LOW
#define MED
#define HIGH
#endif

prefix block, so I'll find out soon enough when this will be fixed :)

@Darkyenus
Copy link
Owner

I think the reported issue was actually same as #46, not #32.

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

3 participants