struct

Cosmo::Token

Inherits Struct / Value / Object

Constructors

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)
Source

Instance methods

lexeme
Source
lexeme=(lexeme : String)
Source
location
Source
to_s

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.

Source
type
Source
type=(type : Syntax)
Source
value
Source