-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Description
Here's a line from a Three.js shader which fails parsing:
const str = `vec3 BRDF_Specular_GGX( const in IncidentLight incidentLight ) {;}`;
const t = tokenize(str);
const p = parse(t);
Error:
expected user defined type, struct or keyword, gotIncidentLight at line 1
It's failing in struct_or_type
on this line
return unexpected('expected user defined type, struct or keyword, got '+token.data)
It might be failing this check
if(token.data === 'struct') {
if(!(stmt.flags & DECL_ALLOW_STRUCT)) {
return unexpected('cannot nest structs')
}
state.unshift(struct())
return Advance
}
Because the token.data isn't 'struct' even though it's a user defined struct
Metadata
Metadata
Assignees
Labels
No labels