Comply with curly brace conventions.

This commit is contained in:
Jan Martin Mikkelsen 2017-06-12 11:10:32 +10:00
parent 8fd4bcfa33
commit 577b1d61bb
38 changed files with 47 additions and 86 deletions

View File

@ -14,6 +14,5 @@ InputMismatchException::InputMismatchException(Parser *recognizer)
recognizer->getCurrentToken()) {
}
InputMismatchException::~InputMismatchException()
{
InputMismatchException::~InputMismatchException() {
}

View File

@ -36,8 +36,7 @@ std::map<std::vector<uint16_t>, atn::ATN> Parser::bypassAltsAtnCache;
Parser::TraceListener::TraceListener(Parser *outerInstance_) : outerInstance(outerInstance_) {
}
Parser::TraceListener::~TraceListener()
{
Parser::TraceListener::~TraceListener() {
}
void Parser::TraceListener::enterEveryRule(ParserRuleContext *ctx) {
@ -60,8 +59,7 @@ void Parser::TraceListener::exitEveryRule(ParserRuleContext *ctx) {
Parser::TrimToSizeListener Parser::TrimToSizeListener::INSTANCE;
Parser::TrimToSizeListener::~TrimToSizeListener()
{
Parser::TrimToSizeListener::~TrimToSizeListener() {
}
void Parser::TrimToSizeListener::enterEveryRule(ParserRuleContext * /*ctx*/) {

View File

@ -27,8 +27,7 @@ RecognitionException::RecognitionException(const std::string &message, Recognize
}
}
RecognitionException::~RecognitionException()
{
RecognitionException::~RecognitionException() {
}
size_t RecognitionException::getOffendingState() const {

View File

@ -27,8 +27,7 @@ Recognizer::Recognizer() {
_proxListener.addErrorListener(&ConsoleErrorListener::INSTANCE);
}
Recognizer::~Recognizer()
{
Recognizer::~Recognizer() {
}
dfa::Vocabulary const& Recognizer::getVocabulary() const {

View File

@ -1,5 +1,4 @@
#include "Token.h"
antlr4::Token::~Token()
{
antlr4::Token::~Token() {
}

View File

@ -1,5 +1,4 @@
#include "TokenSource.h"
antlr4::TokenSource::~TokenSource()
{
antlr4::TokenSource::~TokenSource() {
}

View File

@ -22,8 +22,7 @@ Vocabulary::Vocabulary(const std::vector<std::string> &literalNames,
// See note here on -1 part: https://github.com/antlr/antlr4/pull/1146
}
Vocabulary::~Vocabulary()
{
Vocabulary::~Vocabulary() {
}
Vocabulary Vocabulary::fromTokenNames(const std::vector<std::string> &tokenNames) {

View File

@ -1,5 +1,4 @@
#include "WritableToken.h"
antlr4::WritableToken::~WritableToken()
{
antlr4::WritableToken::~WritableToken() {
}

View File

@ -18,8 +18,7 @@ ATNDeserializationOptions::ATNDeserializationOptions(ATNDeserializationOptions *
this->generateRuleBypassTransitions = options->generateRuleBypassTransitions;
}
ATNDeserializationOptions::~ATNDeserializationOptions()
{
ATNDeserializationOptions::~ATNDeserializationOptions() {
}
const ATNDeserializationOptions& ATNDeserializationOptions::getDefaultOptions() {

View File

@ -110,8 +110,7 @@ ATNDeserializer::ATNDeserializer(): ATNDeserializer(ATNDeserializationOptions::g
ATNDeserializer::ATNDeserializer(const ATNDeserializationOptions& dso): deserializationOptions(dso) {
}
ATNDeserializer::~ATNDeserializer()
{
ATNDeserializer::~ATNDeserializer() {
}
/**

View File

@ -23,8 +23,7 @@ ATNSimulator::ATNSimulator(const ATN &atn, PredictionContextCache &sharedContext
: atn(atn), _sharedContextCache(sharedContextCache) {
}
ATNSimulator::~ATNSimulator()
{
ATNSimulator::~ATNSimulator() {
}
void ATNSimulator::clearDFA() {

View File

@ -10,6 +10,5 @@ using namespace antlr4::atn;
AbstractPredicateTransition::AbstractPredicateTransition(ATNState *target) : Transition(target) {
}
AbstractPredicateTransition::~AbstractPredicateTransition()
{
AbstractPredicateTransition::~AbstractPredicateTransition() {
}

View File

@ -21,8 +21,7 @@ ArrayPredictionContext::ArrayPredictionContext(std::vector<Ref<PredictionContext
assert(returnStates.size() > 0);
}
ArrayPredictionContext::~ArrayPredictionContext()
{
ArrayPredictionContext::~ArrayPredictionContext() {
}
bool ArrayPredictionContext::isEmpty() const {

View File

@ -1,5 +1,4 @@
#include "BlockStartState.h"
antlr4::atn::BlockStartState::~BlockStartState()
{
antlr4::atn::BlockStartState::~BlockStartState() {
}

View File

@ -25,8 +25,7 @@ using namespace antlrcpp;
LL1Analyzer::LL1Analyzer(const ATN &atn) : _atn(atn) {
}
LL1Analyzer::~LL1Analyzer()
{
LL1Analyzer::~LL1Analyzer() {
}
std::vector<misc::IntervalSet> LL1Analyzer::getDecisionLookahead(ATNState *s) const {

View File

@ -31,8 +31,7 @@ using namespace antlr4;
using namespace antlr4::atn;
using namespace antlrcpp;
LexerATNSimulator::SimState::~SimState()
{
LexerATNSimulator::SimState::~SimState() {
}
void LexerATNSimulator::SimState::reset() {

View File

@ -1,5 +1,4 @@
#include "LexerAction.h"
antlr4::atn::LexerAction::~LexerAction()
{
antlr4::atn::LexerAction::~LexerAction() {
}

View File

@ -19,8 +19,7 @@ LexerActionExecutor::LexerActionExecutor(const std::vector<Ref<LexerAction>> &le
: _lexerActions(lexerActions), _hashCode(generateHashCode()) {
}
LexerActionExecutor::~LexerActionExecutor()
{
LexerActionExecutor::~LexerActionExecutor() {
}
Ref<LexerActionExecutor> LexerActionExecutor::append(Ref<LexerActionExecutor> const& lexerActionExecutor,

View File

@ -13,8 +13,7 @@ using namespace antlr4::atn;
ParseInfo::ParseInfo(ProfilingATNSimulator *atnSimulator) : _atnSimulator(atnSimulator) {
}
ParseInfo::~ParseInfo()
{
ParseInfo::~ParseInfo() {
}
std::vector<DecisionInfo> ParseInfo::getDecisionInfo() {

View File

@ -13,10 +13,6 @@ using namespace antlr4;
using namespace antlr4::atn;
using namespace antlrcpp;
SemanticContext::~SemanticContext()
{
}
//------------------ Predicate -----------------------------------------------------------------------------------------
SemanticContext::Predicate::Predicate() : Predicate(INVALID_INDEX, INVALID_INDEX, false) {
@ -315,6 +311,9 @@ std::string SemanticContext::OR::toString() const {
const Ref<SemanticContext> SemanticContext::NONE = std::make_shared<Predicate>(INVALID_INDEX, INVALID_INDEX, false);
SemanticContext::~SemanticContext() {
}
bool SemanticContext::operator != (const SemanticContext &other) const {
return !(*this == other);
}
@ -371,6 +370,8 @@ std::vector<Ref<SemanticContext::PrecedencePredicate>> SemanticContext::filterPr
return result;
}
SemanticContext::Operator::~Operator()
{
//------------------ Operator -----------------------------------------------------------------------------------------
SemanticContext::Operator::~Operator() {
}

View File

@ -15,8 +15,7 @@ SingletonPredictionContext::SingletonPredictionContext(Ref<PredictionContext> co
assert(returnState != ATNState::INVALID_STATE_NUMBER);
}
SingletonPredictionContext::~SingletonPredictionContext()
{
SingletonPredictionContext::~SingletonPredictionContext() {
}
Ref<SingletonPredictionContext> SingletonPredictionContext::create(Ref<PredictionContext> const& parent, size_t returnState) {

View File

@ -25,8 +25,7 @@ Transition::Transition(ATNState *target) {
this->target = target;
}
Transition::~Transition()
{
Transition::~Transition() {
}
bool Transition::isEpsilon() const {

View File

@ -17,8 +17,7 @@ DFASerializer::DFASerializer(const DFA *dfa, const std::vector<std::string>& tok
DFASerializer::DFASerializer(const DFA *dfa, const Vocabulary &vocabulary) : _dfa(dfa), _vocabulary(vocabulary) {
}
DFASerializer::~DFASerializer()
{
DFASerializer::~DFASerializer() {
}
std::string DFASerializer::toString() const {

View File

@ -18,8 +18,7 @@ DFAState::PredPrediction::PredPrediction(const Ref<SemanticContext> &pred, int a
this->alt = alt;
}
DFAState::PredPrediction::~PredPrediction()
{
DFAState::PredPrediction::~PredPrediction() {
}
std::string DFAState::PredPrediction::toString() {

View File

@ -12,8 +12,7 @@ using namespace antlr4::dfa;
LexerDFASerializer::LexerDFASerializer(DFA *dfa) : DFASerializer(dfa, Vocabulary::EMPTY_VOCABULARY) {
}
LexerDFASerializer::~LexerDFASerializer()
{
LexerDFASerializer::~LexerDFASerializer() {
}
std::string LexerDFASerializer::getEdgeLabel(size_t i) const {

View File

@ -1,5 +1,4 @@
#include "misc/Predicate.h"
antlr4::misc::Predicate::~Predicate()
{
antlr4::misc::Predicate::~Predicate() {
}

View File

@ -5,6 +5,5 @@ antlrcpp::Any::~Any()
delete _ptr;
}
antlrcpp::Any::Base::~Base()
{
antlrcpp::Any::Base::~Base() {
}

View File

@ -22,8 +22,7 @@ namespace antlrcpp {
struct FinalAction {
FinalAction(std::function<void ()> f) : _cleanUp { f } {}
FinalAction(FinalAction &&other) :
_cleanUp(std::move(other._cleanUp)), _enabled(other._enabled)
{
_cleanUp(std::move(other._cleanUp)), _enabled(other._enabled) {
other._enabled = false; // Don't trigger the lambda after ownership has moved.
}
~FinalAction() { if (_enabled) _cleanUp(); }

View File

@ -1,5 +1,4 @@
#include "tree/ErrorNode.h"
antlr4::tree::ErrorNode::~ErrorNode()
{
antlr4::tree::ErrorNode::~ErrorNode() {
}

View File

@ -1,5 +1,4 @@
#include "ParseTreeListener.h"
antlr4::tree::ParseTreeListener::~ParseTreeListener()
{
antlr4::tree::ParseTreeListener::~ParseTreeListener() {
}

View File

@ -1,5 +1,4 @@
#include "ParseTreeVisitor.h"
antlr4::tree::ParseTreeVisitor::~ParseTreeVisitor()
{
antlr4::tree::ParseTreeVisitor::~ParseTreeVisitor() {
}

View File

@ -17,8 +17,7 @@ using namespace antlrcpp;
static IterativeParseTreeWalker defaultWalker;
ParseTreeWalker &ParseTreeWalker::DEFAULT = defaultWalker;
ParseTreeWalker::~ParseTreeWalker()
{
ParseTreeWalker::~ParseTreeWalker() {
}
void ParseTreeWalker::walk(ParseTreeListener *listener, ParseTree *t) const {

View File

@ -1,5 +1,4 @@
#include "tree/TerminalNode.h"
antlr4::tree::TerminalNode::~TerminalNode()
{
antlr4::tree::TerminalNode::~TerminalNode() {
}

View File

@ -1,5 +1,4 @@
#include "tree/pattern/Chunk.h"
antlr4::tree::pattern::Chunk::~Chunk()
{
antlr4::tree::pattern::Chunk::~Chunk() {
}

View File

@ -19,8 +19,7 @@ ParseTreeMatch::ParseTreeMatch(ParseTree *tree, const ParseTreePattern &pattern,
}
}
ParseTreeMatch::~ParseTreeMatch()
{
ParseTreeMatch::~ParseTreeMatch() {
}
ParseTree* ParseTreeMatch::get(const std::string &label) {

View File

@ -34,20 +34,17 @@ using namespace antlrcpp;
ParseTreePatternMatcher::CannotInvokeStartRule::CannotInvokeStartRule(const RuntimeException &e) : RuntimeException(e.what()) {
}
ParseTreePatternMatcher::CannotInvokeStartRule::~CannotInvokeStartRule()
{
ParseTreePatternMatcher::CannotInvokeStartRule::~CannotInvokeStartRule() {
}
ParseTreePatternMatcher::StartRuleDoesNotConsumeFullPattern::~StartRuleDoesNotConsumeFullPattern()
{
ParseTreePatternMatcher::StartRuleDoesNotConsumeFullPattern::~StartRuleDoesNotConsumeFullPattern() {
}
ParseTreePatternMatcher::ParseTreePatternMatcher(Lexer *lexer, Parser *parser) : _lexer(lexer), _parser(parser) {
InitializeInstanceFields();
}
ParseTreePatternMatcher::~ParseTreePatternMatcher()
{
ParseTreePatternMatcher::~ParseTreePatternMatcher() {
}
void ParseTreePatternMatcher::setDelimiters(const std::string &start, const std::string &stop, const std::string &escapeLeft) {

View File

@ -19,8 +19,7 @@ TagChunk::TagChunk(const std::string &label, const std::string &tag) : _tag(tag)
}
TagChunk::~TagChunk()
{
TagChunk::~TagChunk() {
}
std::string TagChunk::getTag() {

View File

@ -16,8 +16,7 @@ TextChunk::TextChunk(const std::string &text) : text(text) {
}
TextChunk::~TextChunk()
{
TextChunk::~TextChunk() {
}
std::string TextChunk::getText() {