class Yadriggy::BeginEnd

begin-end.

Attributes

body[R]

@return [Exprs|ASTnode] the body.

rescue[R]

@return [Rescue|nil] the rescue clause.

Public Class Methods

new(sexp) click to toggle source
# File lib/yadriggy/ast.rb, line 1555
def initialize(sexp)
  bodystmt = has_tag?(sexp[1], :bodystmt)
  @body = Exprs.make(bodystmt[1])
  @rescue = Rescue.make(bodystmt[2], bodystmt[3], bodystmt[4])
  add_child(@body)
  add_child(@rescue)
end
tag() click to toggle source
# File lib/yadriggy/ast.rb, line 1553
def self.tag() :begin end

Public Instance Methods

accept(evaluator) click to toggle source

A method for Visitor pattern. @param [Eval] evaluator the visitor of Visitor pattern. @return [void]

# File lib/yadriggy/ast.rb, line 1566
def accept(evaluator)
  evaluator.begin_end(self)
end