mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:48:11 +00:00
LibJS: Correct behaviour of direct vs. indirect eval
eval only has direct access to the local scope when accessed through the name eval. This includes locals named eval, because of course it does.
This commit is contained in:
parent
5d24b5f4be
commit
2822da8c8f
10 changed files with 121 additions and 20 deletions
|
@ -37,7 +37,7 @@ class Parser {
|
|||
public:
|
||||
explicit Parser(Lexer lexer);
|
||||
|
||||
NonnullRefPtr<Program> parse_program();
|
||||
NonnullRefPtr<Program> parse_program(bool starts_in_strict_mode = false);
|
||||
|
||||
template<typename FunctionNodeType>
|
||||
NonnullRefPtr<FunctionNodeType> parse_function_node(u8 parse_options = FunctionNodeParseOptions::CheckForFunctionAndName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue