class BELParser::Language::Syntax::SyntaxError

SyntaxError defines a {SyntaxResult} that should be regarded as an error with the expression.

Public Class Methods

new(expression_node, specification) click to toggle source
Calls superclass method
# File lib/bel_parser/language/syntax_error.rb, line 9
def initialize(expression_node, specification)
  super(expression_node, specification)
end

Public Instance Methods

failure?() click to toggle source
# File lib/bel_parser/language/syntax_error.rb, line 22
def failure?
  true
end
msg() click to toggle source

@abstract Subclass and override {#msg} to provide the message.

# File lib/bel_parser/language/syntax_error.rb, line 14
def msg
  raise NotImplementedError, "#{__method__} is not implemented."
end
success?() click to toggle source
# File lib/bel_parser/language/syntax_error.rb, line 18
def success?
  false
end
to_s() click to toggle source
# File lib/bel_parser/language/syntax_error.rb, line 26
def to_s
  "Error: #{msg}"
end