MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: block_needs_scope now accounts for function declarations

+8 -1
+8 -1
src/ant.c
··· 4627 4627 if (t == TOK_EOF) break; 4628 4628 if (t == TOK_LBRACE) { depth++; js->consumed = 1; continue; } 4629 4629 if (t == TOK_RBRACE) { depth--; js->consumed = 1; continue; } 4630 - if (depth == 1 && (t == TOK_LET || t == TOK_CONST || t == TOK_CLASS)) { needs = true; break; } 4630 + 4631 + if (depth == 1 && ( 4632 + t == TOK_LET || 4633 + t == TOK_CONST || 4634 + t == TOK_CLASS || 4635 + t == TOK_FUNC 4636 + )) { needs = true; break; } 4637 + 4631 4638 js->consumed = 1; 4632 4639 } 4633 4640