struct Cosmo::Token

Defined in:

cosmo/syntax/lexer/token.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(lexeme : String, type : Cosmo::Syntax, value : Bool | Char | Float32 | Float64 | Int128 | Int16 | Int32 | Int64 | Int8 | String | UInt16 | UInt32 | UInt64 | UInt8 | Nil, location : Cosmo::Location) #

[View source]

Instance Method Detail

def lexeme : String #

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

[View source]
def location : Location #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def type : Syntax #

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

[View source]
def value : LiteralType #

[View source]