llvm/clang-tools-extra/clang-query/QueryParser.cpp

//===---- QueryParser.cpp - clang-query command parser --------------------===//
//
// 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 "QueryParser.h"
#include "Query.h"
#include "QuerySession.h"
#include "clang/ASTMatchers/Dynamic/Parser.h"
#include "clang/Basic/CharInfo.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include <optional>
#include <set>

usingnamespacellvm;
usingnamespaceclang::ast_matchers::dynamic;

namespace clang {
namespace query {

// Lex any amount of whitespace followed by a "word" (any sequence of
// non-whitespace characters) from the start of region [Begin,End).  If no word
// is found before End, return StringRef().  Begin is adjusted to exclude the
// lexed region.
StringRef QueryParser::lexWord() {}

// This is the StringSwitch-alike used by lexOrCompleteWord below. See that
// function for details.
template <typename T> struct QueryParser::LexOrCompleteWord {};

QueryRef QueryParser::parseSetBool(bool QuerySession::*Var) {}

template <typename QueryType> QueryRef QueryParser::parseSetOutputKind() {}

QueryRef QueryParser::parseSetTraversalKind(TraversalKind QuerySession::*Var) {}

QueryRef QueryParser::endQuery(QueryRef Q) {}

namespace {

enum ParsedQueryKind {};

enum ParsedQueryVariable {};

QueryRef makeInvalidQueryFromDiagnostics(const Diagnostics &Diag) {}

} // namespace

QueryRef QueryParser::completeMatcherExpression() {}

QueryRef QueryParser::doParse() {}

QueryRef QueryParser::parse(StringRef Line, const QuerySession &QS) {}

std::vector<LineEditor::Completion>
QueryParser::complete(StringRef Line, size_t Pos, const QuerySession &QS) {}

} // namespace query
} // namespace clang