class CLTK::LexingError

Overview

A LexingError exception is raised when an input stream contains a substring that isn't matched by any of a lexer's rules.

Defined in:

cltk/lexer.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

in?(collection : Array | Set) in?

Constructor Detail

def self.new(stream_offset : Int32, line_number : Int32, line_offset : Int32, remainder : String) #

@param [Integer] stream_offset Offset from begnning of string. @param [Integer] line_number Number of newlines encountered so far. @param [Integer] line_offset Offset from beginning of line. @param [String] remainder Rest of the string that couldn't be lexed.


[View source]

Instance Method Detail

def line_number : Int32 #

@return [Integer]


[View source]
def line_offset : Int32 #

@return [Integer]


[View source]
def remainder : String #

@return [String]


[View source]
def stream_offset : Int32 #

@return [Integer]


[View source]
def to_s #

@return [String] String representation of the error.


[View source]