Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
lit
main
Top Level Namespace
ExitCode
ExitCode
Lit
Callable
Clock
Debug
Environment
Expr
Assign
Binary
Call
Grouping
Literal
Logical
Ternary
Unary
Variable
Visitor
Formatter
Function
Interpreter
Return
Lit
Parser
ParserError
REPL
RuntimeError
Scanner
Stmt
Block
Expression
Function
If
Let
Print
Println
Return
Visitor
While
Text
Token
TokenType
Value
Generated using Crystal 1.14.0
2025-03-17 14:05:06 UTC
class
Lit::
Stmt::
If
Lit::Stmt::If
Lit::Stmt
Reference
Object
Defined in:
lit/stmt.cr
Constructors
.new
(condition : ::Lit::Expr, then_branch : ::Lit::Stmt, else_branch : ::Lit::Stmt | Nil)
Instance Method Summary
#accept
(visitor : Visitor)
#condition
: Expr
#else_branch
: Stmt | Nil
#then_branch
: Stmt
Instance methods inherited from class
Lit::Stmt
accept(visitor : Visitor)
accept
Constructor Detail
def self.
new
(condition :
::Lit::Expr
, then_branch :
::Lit::Stmt
, else_branch :
::Lit::Stmt
| Nil)
#
[
View source
]
Instance Method Detail
def
accept
(visitor :
Visitor
)
#
[
View source
]
def
condition
:
Expr
#
[
View source
]
def
else_branch
:
Stmt
| Nil
#
[
View source
]
def
then_branch
:
Stmt
#
[
View source
]