1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 19:45:08 +00:00

LibJS: break or continue with nonexistent label is a syntax error

This commit is contained in:
Matthew Olsson 2020-10-08 10:49:08 -07:00 committed by Andreas Kling
parent 67f2301150
commit e8da5f99b1
4 changed files with 32 additions and 5 deletions

View file

@ -26,6 +26,7 @@
#pragma once
#include <AK/HashTable.h>
#include <AK/NonnullRefPtr.h>
#include <AK/StringBuilder.h>
#include <LibJS/AST.h>
@ -155,6 +156,7 @@ private:
Vector<NonnullRefPtrVector<VariableDeclaration>> m_let_scopes;
Vector<NonnullRefPtrVector<FunctionDeclaration>> m_function_scopes;
UseStrictDirectiveState m_use_strict_directive { UseStrictDirectiveState::None };
HashTable<StringView> m_labels_in_scope;
bool m_strict_mode { false };
bool m_allow_super_property_lookup { false };
bool m_allow_super_constructor_call { false };