mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-21 02:22:51 +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:
parent
f05d291b41
commit
cd8f4aaa7d
Notes:
sideshowbarker
2024-07-16 17:05:37 +09:00
Author: https://github.com/DanShaders
Commit: cd8f4aaa7d
Pull-request: https://github.com/SerenityOS/serenity/pull/20876
Reviewed-by: https://github.com/ADKaster
9 changed files with 74 additions and 9 deletions
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))
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue