llvm/clang/lib/Tooling/Syntax/Synthesis.cpp

//===- Synthesis.cpp ------------------------------------------*- C++ -*-=====//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "clang/Basic/TokenKinds.h"
#include "clang/Tooling/Syntax/BuildTree.h"
#include "clang/Tooling/Syntax/Tree.h"
#include "clang/Tooling/Syntax/Tokens.h"
#include "clang/Tooling/Syntax/TokenBufferTokenManager.h"

usingnamespaceclang;

/// Exposes private syntax tree APIs required to implement node synthesis.
/// Should not be used for anything else.
class clang::syntax::FactoryImpl {};

// FIXME: `createLeaf` is based on `syntax::tokenize` internally, as such it
// doesn't support digraphs or line continuations.
syntax::Leaf *clang::syntax::createLeaf(syntax::Arena &A,
                                        TokenBufferTokenManager &TBTM,
                                        tok::TokenKind K, StringRef Spelling) {}

syntax::Leaf *clang::syntax::createLeaf(syntax::Arena &A,
                                        TokenBufferTokenManager &TBTM,
                                        tok::TokenKind K) {}

namespace {
// Allocates the concrete syntax `Tree` according to its `NodeKind`.
syntax::Tree *allocateTree(syntax::Arena &A, syntax::NodeKind Kind) {}
} // namespace

syntax::Tree *clang::syntax::createTree(
    syntax::Arena &A,
    ArrayRef<std::pair<syntax::Node *, syntax::NodeRole>> Children,
    syntax::NodeKind K) {}

syntax::Node *clang::syntax::deepCopyExpandingMacros(syntax::Arena &A,
                                                    TokenBufferTokenManager &TBTM,
                                                     const syntax::Node *N) {}

syntax::EmptyStatement *clang::syntax::createEmptyStatement(syntax::Arena &A,  TokenBufferTokenManager &TBTM) {}