struct CLTK::StreamPosition
- CLTK::StreamPosition
- Struct
- Value
- Object
Overview
The StreamPosition class is used to indicate the position of a token or other text inside a stream.
Defined in:
cltk/streamposition.crConstructors
-
.new(stream_offset : Int32 = 0, line_number : Int32 = 0, line_offset : Int32 = 0, length : Int32 = 0, file_name : String | Nil = nil)
Instantiates a new StreamPosition object with the values specified.
Instance Method Summary
-
#file_name : String?
@return [String]
-
#length : Int32
@return [Integer]
-
#length=(length : Int32)
@return [Integer]
-
#line_number : Int32
@return [Integer]
-
#line_offset : Int32
@return [Integer]
-
#line_offset=(line_offset : Int32)
@return [Integer]
- #start : Int32
-
#stream_offset : Int32
@return [Integer]
-
#stream_offset=(stream_offset : Int32)
@return [Integer]
Instance methods inherited from class Object
in?(collection : Array | Set)
in?
Constructor Detail
Instantiates a new StreamPosition object with the values specified.
@param [Integer] stream_offset The position from the beginning of the stream. @param [Integer] line_number The number of newlines since the beginning of the file. @param [Integer] line_offset The offset of this token from the beginning of the current line. @param [Integer] length The length of the text of the token. @param [String, nil] file_name The name of the file being lexed.