mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibJS: Implement const variable declarations
This also tightens the means of redeclaration of a variable by proxy, since we now have a way of knowing how a variable was initially declared, we can check if it was declared using `let` or `const` and not tolerate redeclaration like we did previously.
This commit is contained in:
parent
8557bc56f7
commit
ee5a49e2fe
Notes:
sideshowbarker
2024-07-19 08:20:50 +09:00
Author: https://github.com/0xtechnobabble
Commit: ee5a49e2fe
Pull-request: https://github.com/SerenityOS/serenity/pull/1427
Reviewed-by: https://github.com/awesomekling ✅
5 changed files with 46 additions and 13 deletions
|
@ -470,6 +470,7 @@ private:
|
|||
enum class DeclarationType {
|
||||
Var,
|
||||
Let,
|
||||
Const,
|
||||
};
|
||||
|
||||
class VariableDeclaration : public Statement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue