mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 10:08:10 +00:00
LibJS: Allow multiple labels on the same statement
Since there are only a number of statements where labels can actually be used we now also only store labels when necessary. Also now tracks the first continue usage of a label since this might not be valid but that can only be determined after we have parsed the statement. Also ensures the correct error does not get wiped by load_state.
This commit is contained in:
parent
bfc1b4ba61
commit
79caca8ca2
7 changed files with 194 additions and 47 deletions
|
@ -259,7 +259,7 @@ private:
|
|||
|
||||
Vector<Vector<FunctionNode::Parameter>&> function_parameters;
|
||||
|
||||
HashMap<StringView, bool> labels_in_scope;
|
||||
HashMap<StringView, Optional<Position>> labels_in_scope;
|
||||
bool strict_mode { false };
|
||||
bool allow_super_property_lookup { false };
|
||||
bool allow_super_constructor_call { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue