mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 11:55:10 +00:00
LibJS: Start adding a JS::Script class (spec's "Script Record")
This commit is contained in:
parent
619ee99c34
commit
612a23d6fc
3 changed files with 60 additions and 0 deletions
26
Userland/Libraries/LibJS/Script.cpp
Normal file
26
Userland/Libraries/LibJS/Script.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Script.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
NonnullRefPtr<Script> Script::create(GlobalObject& global_object, NonnullRefPtr<ASTNode> parse_node)
|
||||
{
|
||||
return adopt_ref(*new Script(global_object, move(parse_node)));
|
||||
}
|
||||
|
||||
Script::Script(GlobalObject& global_object, NonnullRefPtr<ASTNode> parse_node)
|
||||
: m_global_object(make_handle(&global_object))
|
||||
, m_parse_node(move(parse_node))
|
||||
{
|
||||
}
|
||||
|
||||
Script::~Script()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue