class CLTK::StreamPosition
- CLTK::StreamPosition
- Reference
- Object
Overview
The StreamPosition class is used to indicate the position of a token or other text inside a stream.
Defined in:
cltk/streamposition.crClass Method Summary
-
.new(stream_offset = 0, line_number = 0, line_offset = 0, length = 0, file_name : String? = nil)
Instantiates a new StreamPosition object with the values specified.
Instance Method Summary
-
#clone
Returns a copy of
self
with all instance variables cloned. -
#file_name : String?
@return [String]
-
#length : Int32
@return [Integer]
-
#length=(length)
@return [Integer]
-
#line_number : Int32
@return [Integer]
-
#line_offset : Int32
@return [Integer]
-
#line_offset=(line_offset)
@return [Integer]
- #start : Int32
-
#stream_offset : Int32
@return [Integer]
-
#stream_offset=(stream_offset)
@return [Integer]
Instance methods inherited from class Object
in?(collection : Array | Set)
in?
Class Method 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.