chromium/v8/src/torque/torque-compiler.h

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_TORQUE_TORQUE_COMPILER_H_
#define V8_TORQUE_TORQUE_COMPILER_H_

#include <optional>

#include "src/base/contextual.h"
#include "src/torque/ast.h"
#include "src/torque/kythe-data.h"
#include "src/torque/server-data.h"
#include "src/torque/source-positions.h"
#include "src/torque/utils.h"

namespace v8::internal::torque {

struct TorqueCompilerOptions {};

struct TorqueCompilerResult {};

struct TorqueCompilationUnit {};

V8_EXPORT_PRIVATE TorqueCompilerResult
CompileTorque(const std::string& source, TorqueCompilerOptions options);
TorqueCompilerResult CompileTorque(std::vector<std::string> files,
                                   TorqueCompilerOptions options);
V8_EXPORT_PRIVATE TorqueCompilerResult CompileTorqueForKythe(
    std::vector<TorqueCompilationUnit> units, TorqueCompilerOptions options,
    KytheConsumer* kythe_consumer);

}  // namespace v8::internal::torque

#endif  // V8_TORQUE_TORQUE_COMPILER_H_