You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extension is reporting a syntax error whenever I create a version 450 GLSL file and use a basic for loop in it. For example, I can create the following file:
#version 450
void doStuff(void) {
for (int i = 0; i < 10; i++) {
// Nothing
}
}
And it will give me two syntax errors. One highlights the closing parenthesis on the for loop, saying "Syntax error: expected a semi-colon ; after the expression", and the second highlights the closing curly brace at the end of the doStuff() function definition, saying "Syntax error: expected a closing brace '}'".
The syntax error does disappear if I add a third semicolon after the increment expression, making it for (int i = 0; i < 10; i++;) {, but I've never seen a construction like that, and if I try to compile the compilation fails there.
I'm not incredibly experienced with GLSL yet, but a lot of Googling didn't show any reason such a basic for loop construction wouldn't work, and perhaps more importantly, the code does compile and run just fine, so it seems to be an extraneous error from the parser.
The text was updated successfully, but these errors were encountered:
vscode extension version: 0.0.2
glsl-lsp version: 0.0.2
OS: Windows_NT x64 10.0.22631
The extension is reporting a syntax error whenever I create a version 450 GLSL file and use a basic for loop in it. For example, I can create the following file:
And it will give me two syntax errors. One highlights the closing parenthesis on the for loop, saying "Syntax error: expected a semi-colon
;
after the expression", and the second highlights the closing curly brace at the end of thedoStuff()
function definition, saying "Syntax error: expected a closing brace '}'".The syntax error does disappear if I add a third semicolon after the increment expression, making it
for (int i = 0; i < 10; i++;) {
, but I've never seen a construction like that, and if I try to compile the compilation fails there.I'm not incredibly experienced with GLSL yet, but a lot of Googling didn't show any reason such a basic for loop construction wouldn't work, and perhaps more importantly, the code does compile and run just fine, so it seems to be an extraneous error from the parser.
The text was updated successfully, but these errors were encountered: