[jsinterp] This isn't C, we don't need semicolons

This commit is contained in:
Bernd Jendrissek 2022-08-20 04:36:57 +02:00
commit 10e59b6c7f

View file

@ -256,7 +256,7 @@ class JSInterpreter(object):
in_quote, escaping, skipping = None, False, 0 in_quote, escaping, skipping = None, False, 0
in_comment_block, in_comment_line, finishing_comment = False, False, False in_comment_block, in_comment_line, finishing_comment = False, False, False
after_op, in_regex_char_group, skip_re = True, False, 0 after_op, in_regex_char_group, skip_re = True, False, 0
start_comment = None; start_comment = None
comment_spans = [] comment_spans = []
for idx, char in enumerate(expr): for idx, char in enumerate(expr):
@ -287,15 +287,15 @@ class JSInterpreter(object):
if in_comment_line: if in_comment_line:
if char == '\n': if char == '\n':
in_comment_line = False in_comment_line = False
comment_spans.append((start_comment, idx)); comment_spans.append((start_comment, idx))
start_comment = None start_comment = None
continue continue
if finishing_comment: if finishing_comment:
# Eat the final '/' of a '/* ... */' comment. # Eat the final '/' of a '/* ... */' comment.
finishing_comment = False finishing_comment = False
comment_spans.append((start_comment, idx)); comment_spans.append((start_comment, idx))
start_comment = None start_comment = None
continue; continue
if not in_quote: if not in_quote:
if char in _MATCHING_PARENS: if char in _MATCHING_PARENS:
counters[_MATCHING_PARENS[char]] += 1 counters[_MATCHING_PARENS[char]] += 1