mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
JSSpecCompiler: Introduce Function and ExecutionContext classes
Currently, they are not extremely useful, but the plan is to store all function-local state in JSSpecCompiler::Function and all "translation unit" state in ExecutionContext.
This commit is contained in:
committed by
Andrew Kaster
parent
f05d291b41
commit
cd8f4aaa7d
19
Meta/Lagom/Tools/CodeGenerators/JSSpecCompiler/Function.cpp
Normal file
19
Meta/Lagom/Tools/CodeGenerators/JSSpecCompiler/Function.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Dan Klishch <danilklishch@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "Function.h"
|
||||
#include "AST/AST.h"
|
||||
|
||||
namespace JSSpecCompiler {
|
||||
|
||||
Function::Function(ExecutionContext* context, StringView name, Tree ast)
|
||||
: m_context(context)
|
||||
, m_name(name)
|
||||
, m_ast(move(ast))
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user