class Yadriggy::Super
Reserved
word `super`. `super` is a reserved word but no position (line numbre) is associated with it. Hence {Super} is not a subclass of {Reserved}.
Public Class Methods
new(sexp)
click to toggle source
# File lib/yadriggy/ast.rb, line 239 def initialize(sexp) end
tag()
click to toggle source
# File lib/yadriggy/ast.rb, line 237 def self.tag() :zsuper 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 244 def accept(evaluator) evaluator.super_method(self) end
invoked_method()
click to toggle source
Gets the super method (Method or UnboundMethod object) or nil. If this AST node is not a part of method body, Undef is returned.
# File lib/yadriggy/ast_value.rb, line 253 def invoked_method() mthd = root.context if mthd.is_a?(Method) || mthd.is_a?(UnboundMethod) mthd.super_method else Undef end end
value()
click to toggle source
Gets an ASTree
object representing the method body invoked by this call to super. Undef may be returned if the method is not found.
# File lib/yadriggy/ast_value.rb, line 240 def value() mth = invoked_method if mth == Undef Undef else root.reify(mth) || Undef end end