class PuppetLint::LexerError

Internal: A generic error thrown by the lexer when it encounters something it can't handle.

Attributes

column[R]

Internal: Get the Integer column number of the location of the error.

line_no[R]

Internal: Get the Integer line number of the location of the error.

reason[R]

Internal: Get the String reason for the error (if known).

Public Class Methods

new(line_no, column, reason = nil) click to toggle source

Internal: Initialise a new PuppetLint::LexerError object.

#line_no - The Integer line number of the location of the error. column - The Integer column number of the location of the error. reason - A String describing the cause of the error (if known).

# File lib/puppet-lint/lexer.rb, line 26
def initialize(line_no, column, reason = nil)
  @line_no = line_no
  @column = column
  @reason = reason
end

Public Instance Methods

to_s() click to toggle source
# File lib/puppet-lint/lexer.rb, line 32
def to_s
  "PuppetLint::LexerError: Line:#{line_no} Column: #{column} Reason: #{reason}"
end