Skip to content

Commit

Permalink
properly detect nested classes. Closes #1313
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiosantoscode committed Dec 1, 2022
1 parent b91e0ce commit 68461d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/parse.js
Expand Up @@ -2548,6 +2548,7 @@ function parse($TEXT, options) {

expect("{");
// mark in class feild,
const save_in_class = S.in_class;
S.in_class = true;
while (is("punc", ";")) { next(); } // Leading semicolons are okay in class bodies.
while (!is("punc", "}")) {
Expand All @@ -2558,7 +2559,7 @@ function parse($TEXT, options) {
while (is("punc", ";")) { next(); }
}
// mark in class feild,
S.in_class = false;
S.in_class = save_in_class;

S.input.pop_directives_stack();

Expand Down

0 comments on commit 68461d4

Please sign in to comment.