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

LibJS: Add naive implementation of eval() :^)

This parses and executes a code string in the caller's lexical scope.
This commit is contained in:
Andreas Kling 2021-03-14 16:20:01 +01:00
parent 64cb04996f
commit 4da3e5d91f
3 changed files with 22 additions and 0 deletions

View file

@ -81,6 +81,7 @@ private:
JS_DECLARE_NATIVE_FUNCTION(is_finite);
JS_DECLARE_NATIVE_FUNCTION(parse_float);
JS_DECLARE_NATIVE_FUNCTION(parse_int);
JS_DECLARE_NATIVE_FUNCTION(eval);
NonnullOwnPtr<Console> m_console;