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.
8 #include "atn/LexerAction.h"
9 #include "atn/LexerActionType.h"
15 /// Implements the {@code skip} lexer action by calling <seealso cref="Lexer#skip"/>.
17 /// <para>The {@code skip} command does not have any parameters, so this action is
18 /// implemented as a singleton instance exposed by <seealso cref="#INSTANCE"/>.</para>
20 /// @author Sam Harwell
23 class ANTLR4CPP_PUBLIC LexerSkipAction final : public LexerAction {
25 /// Provides a singleton instance of this parameterless lexer action.
26 static const Ref<LexerSkipAction> getInstance();
29 /// {@inheritDoc} </summary>
30 /// <returns> This method returns <seealso cref="LexerActionType#SKIP"/>. </returns>
31 virtual LexerActionType getActionType() const override;
34 /// {@inheritDoc} </summary>
35 /// <returns> This method returns {@code false}. </returns>
36 virtual bool isPositionDependent() const override;
41 /// <para>This action is implemented by calling <seealso cref="Lexer#skip"/>.</para>
43 virtual void execute(Lexer *lexer) override;
45 virtual size_t hashCode() const override;
46 virtual bool operator == (const LexerAction &obj) const override;
47 virtual std::string toString() const override;
50 /// Constructs the singleton instance of the lexer {@code skip} command.