Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
crylox
main
Crylox
ASTPrinter
Binary
CLI
Expr
Expression
Grouping
Literal
LiteralType
ParseError
Parser
Print
Scanner
Stmt
Token
TokenType
Unary
Interpreter
Lox
Generated using Crystal 1.14.0
2024-11-26 09:52:13 UTC
class
Crylox::
Token
Crylox::Token
Reference
Object
Defined in:
token.cr
Constructors
.new
(type : TokenType, lexeme : String, literal : LiteralType, line : Int32)
Instance Method Summary
#lexeme
: String
#line
: Int32
#literal
: Bool | Float32 | String | Nil
#to_string
#type
: Crylox::TokenType
Constructor Detail
def self.
new
(type :
TokenType
, lexeme : String, literal :
LiteralType
, line : Int32)
#
[
View source
]
Instance Method Detail
def
lexeme
: String
#
[
View source
]
def
line
: Int32
#
[
View source
]
def
literal
: Bool | Float32 | String | Nil
#
[
View source
]
def
to_string
#
[
View source
]
def
type
:
Crylox::TokenType
#
[
View source
]