1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

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
parent 44f8161166
commit 38dfd04633
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*>&);