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

//===- Tree.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/Tooling/Syntax/Tree.h"
#include "clang/Basic/TokenKinds.h"
#include "clang/Tooling/Syntax/Nodes.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Casting.h"
#include <cassert>

usingnamespaceclang;

namespace {
static void traverse(const syntax::Node *N,
                     llvm::function_ref<void(const syntax::Node *)> Visit) {}
static void traverse(syntax::Node *N,
                     llvm::function_ref<void(syntax::Node *)> Visit) {}
} // namespace

syntax::Leaf::Leaf(syntax::TokenManager::Key K) :{}

syntax::Node::Node(NodeKind Kind)
    :{}

bool syntax::Node::isDetached() const {}

void syntax::Node::setRole(NodeRole NR) {}

void syntax::Tree::appendChildLowLevel(Node *Child, NodeRole Role) {}

void syntax::Tree::appendChildLowLevel(Node *Child) {}

void syntax::Tree::prependChildLowLevel(Node *Child, NodeRole Role) {}

void syntax::Tree::prependChildLowLevel(Node *Child) {}

void syntax::Tree::replaceChildRangeLowLevel(Node *Begin, Node *End,
                                             Node *New) {}

namespace {
static void dumpNode(raw_ostream &OS, const syntax::Node *N,
                     const syntax::TokenManager &TM, llvm::BitVector IndentMask) {}
} // namespace

std::string syntax::Node::dump(const TokenManager &TM) const {}

std::string syntax::Node::dumpTokens(const TokenManager &TM) const {}

void syntax::Node::assertInvariants() const {}

void syntax::Node::assertInvariantsRecursive() const {}

const syntax::Leaf *syntax::Tree::findFirstLeaf() const {}

const syntax::Leaf *syntax::Tree::findLastLeaf() const {}

const syntax::Node *syntax::Tree::findChild(NodeRole R) const {}

std::vector<syntax::List::ElementAndDelimiter<syntax::Node>>
syntax::List::getElementsAsNodesAndDelimiters() {}

// Almost the same implementation of `getElementsAsNodesAndDelimiters` but
// ignoring delimiters
std::vector<syntax::Node *> syntax::List::getElementsAsNodes() {}

clang::tok::TokenKind syntax::List::getDelimiterTokenKind() const {}

syntax::List::TerminationKind syntax::List::getTerminationKind() const {}

bool syntax::List::canBeEmpty() const {}