Function.cpp 404 B

1234567891011121314151617181920
  1. /*
  2. * Copyright (c) 2023, Dan Klishch <danilklishch@gmail.com>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include "Function.h"
  7. #include "AST/AST.h"
  8. namespace JSSpecCompiler {
  9. Function::Function(ExecutionContext* context, StringView name, Tree ast)
  10. : m_context(context)
  11. , m_name(name)
  12. , m_ast(move(ast))
  13. , m_return_value(make_ref_counted<VariableDeclaration>("$return"sv))
  14. {
  15. }
  16. }