class Kaze::Token

Overview

A token in a source file.

Defined in:

token.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(type : TT, lexeme : String, literal : String | Float64 | Nil, line : Int32, column : Int32) #

[View source]

Instance Method Detail

def column : Int32 #

The column in the line where the token is.


[View source]
def column=(column : Int32) #

The column in the line where the token is.


[View source]
def lexeme : String #

The token represented in plaintext.


[View source]
def lexeme=(lexeme : String) #

The token represented in plaintext.


[View source]
def line : Int32 #

The line where the token is.


[View source]
def line=(line : Int32) #

The line where the token is.


[View source]
def literal : String | Float64 | Nil #

The literal of the token, if it exists.


[View source]
def literal=(literal : String | Float64 | Nil) #

The literal of the token, if it exists.


[View source]
def to_s #

Converts the token to a string.


[View source]
def type : TT #

The type of the token.


[View source]
def type=(type : TT) #

The type of the token.


[View source]