LibJS: rename JS::DeclarationType => JS::DeclarationKind

Many other parsers call it with this name.

Also Type can be confusing in this context since the DeclarationType is
not the type (number, string, etc.) of the variables that are being
declared by the VariableDeclaration.
This commit is contained in:
Emanuele Torre 2020-04-08 11:59:18 +02:00 committed by Andreas Kling
commit 38dfd04633
Notes: sideshowbarker 2024-07-19 07:48:48 +09:00
6 changed files with 37 additions and 37 deletions

View file

@ -48,7 +48,7 @@ enum class ScopeType {
struct Variable {
Value value;
DeclarationType declaration_type;
DeclarationKind declaration_kind;
};
struct ScopeFrame {
@ -95,7 +95,7 @@ public:
Optional<Value> get_variable(const FlyString& name);
void set_variable(const FlyString& name, Value, bool first_assignment = false);
void declare_variable(const FlyString& name, DeclarationType);
void declare_variable(const FlyString& name, DeclarationKind);
void gather_roots(Badge<Heap>, HashTable<Cell*>&);