class Kaze::Token
- Kaze::Token
- Reference
- Object
Overview
A token in a source file.
Defined in:
token.crConstructors
Instance Method Summary
-
#column : Int32
The column in the line where the token is.
-
#column=(column : Int32)
The column in the line where the token is.
-
#lexeme : String
The token represented in plaintext.
-
#lexeme=(lexeme : String)
The token represented in plaintext.
-
#line : Int32
The line where the token is.
-
#line=(line : Int32)
The line where the token is.
-
#literal : String | Float64 | Nil
The literal of the token, if it exists.
-
#literal=(literal : String | Float64 | Nil)
The literal of the token, if it exists.
-
#to_s
Converts the token to a string.
-
#type : TT
The type of the token.
-
#type=(type : TT)
The type of the token.
Constructor Detail
def self.new(type : TT, lexeme : String, literal : String | Float64 | Nil, line : Int32, column : Int32)
#