Closed Aeva closed 8 years ago
The bug is in this function.
The parser assumes that a global variable will be declared with one of the following qualifiers: "uniform", "attribute", "varying", or "const". If the mode is not determined, then the function assumes they aren't globals and leaves them in the AST for something else to choke on them.
What it should be doing is looking for something in the pattern of "
Detecting two words before either a "=" or a ";" is probably good enough for now inbefore having some kind of fancy type system in place (and then also recognizing typedefs and structs).
This following is valid GLSL but the compiler fails spectacularly on it: