class Myst::ExceptionHandler
- Myst::ExceptionHandler
- Myst::Node
- Reference
- Object
Overview
A set of Expressions representing semantics for handling exceptions.
Whenever a rescue
or #ensure
is encountered at the end of a Def, Block,
or Begin, the existing node is wrapped in an ExceptionHandler, and the
handling blocks are parsed into this node.
Defined in:
myst/syntax/ast.crConstructors
Instance Method Summary
-
#==(other : self)
Returns
true
if this reference is the same as other. - #body : Node
- #body=(body : Node)
- #else : Node | Nil
- #else=(else : Node | Nil)
- #else? : Node | Nil | Nil
- #end_location
- #ensure : Node | Nil
- #ensure=(ensure : Node | Nil)
- #ensure? : Node | Nil | Nil
-
#hash(hasher)
See
Object#hash(hasher)
- #location
- #rescues : Array(Rescue)
- #rescues=(rescues : Array(Rescue))
Instance methods inherited from class Myst::Node
accept(visitor)
accept,
accept_children(visitor)
accept_children,
at(node : Node)at(node : Nil)
at(location : Location) at, at_end(node : Node)
at_end(node : Nil)
at_end(end_location : Location) at_end, class_desc : String class_desc, end_location : Location | Nil end_location, end_location=(end_location : Location | Nil) end_location=, location : Location | Nil location, location=(location : Location | Nil) location=
Constructor Detail
def self.new(body : Node, rescues : Array(Myst::Rescue) = [] of Rescue, else : Node | Nil = nil, ensure : Node | Nil = nil)
#
Instance Method Detail
def ==(other : self)
#
Description copied from class Reference
Returns true
if this reference is the same as other. Invokes same?
.