1 /* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
2 * Use of this file is governed by the BSD 3-clause license that
3 * can be found in the LICENSE.txt file in the project root.
6 #include "misc/MurmurHash.h"
9 #include "atn/LexerSkipAction.h"
11 using namespace antlr4;
12 using namespace antlr4::atn;
13 using namespace antlr4::misc;
15 const Ref<LexerSkipAction> LexerSkipAction::getInstance() {
16 static Ref<LexerSkipAction> instance(new LexerSkipAction());
20 LexerSkipAction::LexerSkipAction() {
23 LexerActionType LexerSkipAction::getActionType() const {
24 return LexerActionType::SKIP;
27 bool LexerSkipAction::isPositionDependent() const {
31 void LexerSkipAction::execute(Lexer *lexer) {
35 size_t LexerSkipAction::hashCode() const {
36 size_t hash = MurmurHash::initialize();
37 hash = MurmurHash::update(hash, static_cast<size_t>(getActionType()));
38 return MurmurHash::finish(hash, 1);
41 bool LexerSkipAction::operator == (const LexerAction &obj) const {
45 std::string LexerSkipAction::toString() const {