1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00
serenity/Libraries/LibJS
Matthew Olsson 786722149b LibJS: Add strict mode
Adds the ability for a scope (either a function or the entire program)
to be in strict mode. Scopes default to non-strict mode.

There are two ways to determine the strict-ness of the JS engine:

1. In the parser, this can be accessed with the parser_state variable
   m_is_strict_mode boolean. If true, the Parser is currently parsing in
   strict mode. This is done so that the Parser can generate syntax
   errors at parse time, which is required in some cases.

2. With Interpreter.is_strict_mode(). This allows strict mode checking
   at runtime as opposed to compile time.

Additionally, in order to test this, a global isStrictMode() function
has been added to the JS ReplObject under the test-mode flag.
2020-05-28 17:18:42 +02:00
..
Heap LibJS: Use __APPLE__ instead of __MACH__ for MacOS build 2020-05-23 18:09:07 +02:00
Runtime LibJS: Object index properties have descriptors; Handle sparse indices 2020-05-28 17:17:13 +02:00
Tests LibJS: Add strict mode 2020-05-28 17:18:42 +02:00
AST.cpp LibJS: Object index properties have descriptors; Handle sparse indices 2020-05-28 17:17:13 +02:00
AST.h LibJS: Add strict mode 2020-05-28 17:18:42 +02:00
CMakeLists.txt LibJS: Object index properties have descriptors; Handle sparse indices 2020-05-28 17:17:13 +02:00
Console.cpp LibJS: Add side-effect-free version of Value::to_string() 2020-05-15 13:50:42 +02:00
Console.h LibJS: Implement ConsoleClient 2020-05-05 09:15:16 +02:00
Forward.h LibJS: Create JS to HTML markup generator 2020-05-26 10:17:50 +02:00
Interpreter.cpp LibJS: Only log exception throw information on Serenity 2020-05-26 14:36:30 +02:00
Interpreter.h LibJS: Add strict mode 2020-05-28 17:18:42 +02:00
Lexer.cpp LibJS: Fix incorrect token column values (#2401) 2020-05-26 19:00:30 +02:00
Lexer.h LibJS: Fix incorrect token column values (#2401) 2020-05-26 19:00:30 +02:00
MarkupGenerator.cpp LibJS: Object index properties have descriptors; Handle sparse indices 2020-05-28 17:17:13 +02:00
MarkupGenerator.h Browser: Add output styles to JS source printed in the console 2020-05-26 10:17:50 +02:00
Parser.cpp LibJS: Add strict mode 2020-05-28 17:18:42 +02:00
Parser.h LibJS: Add strict mode 2020-05-28 17:18:42 +02:00
Token.cpp LibJS: Handle hex and unicode escape sequences in string literals 2020-05-18 17:58:17 +02:00
Token.h LibJS: Handle hex and unicode escape sequences in string literals 2020-05-18 17:58:17 +02:00