class Parser::SyntaxError

{Parser::SyntaxError} is raised whenever parser detects a syntax error, similar to the standard SyntaxError class.

@api public

@!attribute [r] diagnostic

@return [Parser::Diagnostic]

Attributes

diagnostic[R]

Public Class Methods

new(diagnostic) click to toggle source
Calls superclass method
# File lib/parser/syntax_error.rb, line 16
def initialize(diagnostic)
  @diagnostic = diagnostic
  super(diagnostic.message)
end