StandardError
Internal: A generic error thrown by the lexer when it encounters something it can’t handle.
Internal: Initialise a new PuppetLint::LexerError object.
code - The String manifest code being tokenised. offset - The Integer position in the code string that the tokeniser was
at when it encountered the error.
# File lib/puppet-lint/lexer.rb, line 21 def initialize(code, offset) chunk = code[0..offset] @line_no = chunk.scan(/(\r\n|\r|\n)/).size + 1 if @line_no == 1 @column = chunk.length else @column = chunk.length - chunk.rindex(/(\r\n|\r|\n)/) - 1 end @column = 1 if @column == 0 end
Generated with the Darkfish Rdoc Generator 2.