We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 547bc8b commit dcc31b7Copy full SHA for dcc31b7
src/webgl/ShaderGenerator.js
@@ -19,6 +19,8 @@ function shadergenerator(p5, fn) {
19
if (shaderModifier instanceof Function) {
20
let generatorFunction;
21
if (options.parser) {
22
+ // #7955 Wrap function declaration code in brackets so anonymous functions are not top level statements, which causes an error in acorn when parsing
23
+ // https://github.com/acornjs/acorn/issues/1385
24
const sourceString = `(${shaderModifier.toString()})`;
25
const ast = parse(sourceString, {
26
ecmaVersion: 2021,
0 commit comments