class Cosmo::AST::Statement::TryCatch
Defined in:
cosmo/syntax/parser/statements/try_catch.crConstructors
Instance Method Summary
- #accept(visitor : Visitor(R)) : R forall R
- #catch_block : Base
- #catch_keyword : Token
- #caught_exception : Expression::VarDeclaration
- #finally_block : Base | Nil
- #finally_keyword : Token | Nil
-
#to_s(indent : Int = 0)
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #token : Token
- #try_block : Base
- #try_keyword : Token
Instance methods inherited from class Cosmo::AST::Statement::Base
accept(visitor : Visitor(R)) forall R
accept
Instance methods inherited from class Cosmo::AST::Node
end_location : Location | Nil
end_location,
end_location=(end_location : Location | Nil)
end_location=,
single_expression : Node
single_expression,
single_expression? : Node | Nil
single_expression?,
start_location : Location | Nil
start_location,
start_location=(start_location : Location | Nil)
start_location=,
token : Token
token,
visibility : Cosmo::AST::Visibility
visibility,
visibility=(visibility : Cosmo::AST::Visibility)
visibility=
Constructor Detail
def self.new(try_keyword : Cosmo::Token, catch_keyword : Cosmo::Token, finally_keyword : Cosmo::Token | Nil, try_block : Cosmo::AST::Statement::Base, catch_block : Cosmo::AST::Statement::Base, finally_block : Cosmo::AST::Statement::Base | Nil, caught_exception : Cosmo::AST::Expression::VarDeclaration)
#
Instance Method Detail
def to_s(indent : Int = 0)
#
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
.