stackgl / glsl-parser

transform streamed glsl tokens into an ast
MIT License
98 stars 15 forks source link

uint f (); #14

Closed dy closed 6 years ago

dy commented 8 years ago
var p = require('glsl-parser/direct'), t = require('glsl-tokenizer/string');
p(t('uint x();'));
Error: did not use all tokens
    at module.exports (...node_modules\glsl-parser\lib\expr.js:121:11)
    at parseexpr (...node_modules\glsl-parser\lib\index.js:605:9)
    at parse_expr (...node_modules\glsl-parser\lib\index.js:582:14)
    at write (...node_modules\glsl-parser\lib\index.js:192:18)
    at reader (...node_modules\glsl-parser\lib\index.js:166:5)
    at parseArray (...node_modules\glsl-parser\direct.js:9:5)
    at repl:1:1
    at REPLServer.defaultEval (repl.js:252:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)

whereas int x(); or uint x; works ok.

dy commented 8 years ago

Same with uvec’s