Sha256: 956b450db0ddcb2dcf598f42430574365134d43e0c45a15b7348ccd086fe526f

Contents?: true

Size: 341 Bytes

Versions: 1

Compression:

Stored size: 341 Bytes

Contents

module Parser
  ##
  # {Parser::SyntaxError} is raised whenever parser detects a syntax error
  # (what a surprise!) similar to the standard SyntaxError class.
  #
  class SyntaxError < StandardError
    attr_reader :diagnostic

    def initialize(diagnostic)
      @diagnostic = diagnostic
      super(diagnostic.message)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
parser-2.0.0.pre2 lib/parser/syntax_error.rb