class Myst::ExceptionHandler

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.cr

Constructors

Instance Method Summary

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) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def body : Node #

[View source]
def body=(body : Node) #

[View source]
def else : Node | Nil #

def else=(else : Node | Nil) #

[View source]
def else? : Node | Nil | Nil #

def end_location #

[View source]
def ensure : Node | Nil #

def ensure=(ensure : Node | Nil) #

[View source]
def ensure? : Node | Nil | Nil #

def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def location #

[View source]
def rescues : Array(Rescue) #

[View source]
def rescues=(rescues : Array(Rescue)) #

[View source]