Sha256: 1c8277e58a4342c412c7d877ca3194878d144f0d4f281720da67fe2c52ec06ab
Contents?: true
Size: 898 Bytes
Versions: 19
Compression:
Stored size: 898 Bytes
Contents
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved. * Use of this file is governed by the BSD 3-clause license that * can be found in the LICENSE.txt file in the project root. */ #include "Token.h" #include "misc/IntervalSet.h" #include "atn/SetTransition.h" using namespace antlr4; using namespace antlr4::atn; SetTransition::SetTransition(TransitionType transitionType, ATNState *target, misc::IntervalSet aSet) : Transition(transitionType, target), set(aSet.isEmpty() ? misc::IntervalSet::of(Token::INVALID_TYPE) : std::move(aSet)) { } misc::IntervalSet SetTransition::label() const { return set; } bool SetTransition::matches(size_t symbol, size_t /*minVocabSymbol*/, size_t /*maxVocabSymbol*/) const { return set.contains(symbol); } std::string SetTransition::toString() const { return "SET " + Transition::toString() + " { set: " + set.toString() + "}"; }
Version data entries
19 entries across 19 versions & 3 rubygems