struct Cosmo::Token
- Cosmo::Token
- Struct
- Value
- Object
Defined in:
cosmo/syntax/lexer/token.crConstructors
Instance Method Summary
- #lexeme : String
- #lexeme=(lexeme : String)
- #location : Location
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #type : Syntax
- #type=(type : Syntax)
- #value : LiteralType
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)
#
Instance Method Detail
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
.