class Yadriggy::Label
Label
such as `length:`.
Public Class Methods
new(sexp)
click to toggle source
Calls superclass method
Yadriggy::Name::new
# File lib/yadriggy/ast.rb, line 163 def initialize(sexp) super([:@label, sexp[1].chop, sexp[2]]) end
tag()
click to toggle source
# File lib/yadriggy/ast.rb, line 161 def self.tag() :@label 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 175 def accept(evaluator) evaluator.label(self) end
const_value()
click to toggle source
Gets the name of this label.
# File lib/yadriggy/ast_value.rb, line 140 def const_value() @name end
name()
click to toggle source
@return [String] the label name.
For example, if this object represents `length:`, then `"length"` (without a colon) is returned.
Calls superclass method
# File lib/yadriggy/ast.rb, line 170 def name() super end
value()
click to toggle source
Gets the name of this label.
# File lib/yadriggy/ast_value.rb, line 136 def value() @name end