Sha256: cc101dadb8d95088d234f19a48ee654616a5fa5c23c7dd9c82cd27a7b78204d5

Contents?: true

Size: 607 Bytes

Versions: 3

Compression:

Stored size: 607 Bytes

Contents

module Antelope
  module Ace
    class Token

      # Defines an error token.  This may be used internally by the
      # parser when it enters panic mode; any tokens following this
      # are the synchronisation tokens.  This is considered a terminal
      # for the purposes of rule definitions.
      class Error < Terminal

        # Initialize the error token.  Technically takes no arguments.
        # Sets the name to be `:$error`.
        def initialize(*)
          super :$error
        end

        # (see Token#error?)
        def error?
          true
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
antelope-0.1.1 lib/antelope/ace/token/error.rb
antelope-0.1.0 lib/antelope/ace/token/error.rb
antelope-0.0.1 lib/antelope/ace/token/error.rb