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
{{ message }}
Repository navigation
error parsing comma operator float c = (0.0, 1.0); #22
I didn't realize this was valid glsl code, but apparently it is:
float c = (0.0, 1.0);
and it evaluates to the last statement.
So this fails:
console.log(deparse(parse(tokenize(` void main(void) { float c = (1.0, 2.0); }`))));
expected `)`, got `,` at line 4
at Array.unexpected (node_modules/glsl-parser/lib/index.js:737:11)
at advance (node_modules/glsl-parser/lib/expr.js:219:18)
at Object.nud (node_modules/glsl-parser/lib/expr.js:87:3)
at expression (node_modules/glsl-parser/lib/expr.js:156:12)
at Object.<anonymous>.module.exports (node_modules/glsl-parser/lib/expr.js:116:12)
at parseexpr (node_modules/glsl-parser/lib/index.js:681:9)
at parse_expr (node_modules/glsl-parser/lib/index.js:650:14)
at write (node_modules/glsl-parser/lib/index.js:220:11)
at reader (node_modules/glsl-parser/lib/index.js:181:5)
at parseArray (node_modules/glsl-parser/direct.js:9:5)
Activity