class Yadriggy::GlobalVariable
Global variable.
Public Class Methods
new(sexp)
click to toggle source
Calls superclass method
Yadriggy::Name::new
# File lib/yadriggy/ast.rb, line 184 def initialize(sexp) super(sexp) end
tag()
click to toggle source
# File lib/yadriggy/ast.rb, line 182 def self.tag() :@gvar 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 191 def accept(evaluator) evaluator.global_variable(self) end
value()
click to toggle source
The current value of this global variable.
# File lib/yadriggy/ast_value.rb, line 184 def value() eval(@name) end