class Yadriggy::ClassDef

Class definition.

Attributes

superclass[R]

@return [ASTnode|nil] the super class.

Public Class Methods

new(sexp) click to toggle source
# File lib/yadriggy/ast.rb, line 1667
def initialize(sexp)
  @name = to_node(sexp[1])  # Const or ConstPathRef
  add_child(@name)
  @superclass = to_node(sexp[2])
  add_child(@superclass)
  initialize_body(has_tag?(sexp[3], :bodystmt))
end
tag() click to toggle source
# File lib/yadriggy/ast.rb, line 1665
def self.tag() :class 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 1678
def accept(evaluator)
  evaluator.class_def(self)
end