class RedParse::ListInNode::ElsifNode
Public Class Methods
new(elsifword,condition,thenword,consequent)
click to toggle source
Calls superclass method
RedParse::ListInNode::Node::new
# File lib/redparse/node.rb, line 4406 def initialize(elsifword,condition,thenword,consequent) @offset=elsifword.offset condition.special_conditions! if condition.respond_to? :special_conditions! super(condition,consequent) end
Public Instance Methods
image()
click to toggle source
# File lib/redparse/node.rb, line 4416 def image; "(elsif)" end
parsetree(o)
click to toggle source
# File lib/redparse/node.rb, line 4426 def parsetree(o) #obsolete? [:if, condition.rescue_parsetree(o), consequent&&consequent.parsetree(o), ] end
to_lisp()
click to toggle source
# File lib/redparse/node.rb, line 4422 def to_lisp "("+condition.to_lisp+" "+consequent.to_lisp+")" end
unparse(o=default_unparse_options)
click to toggle source
# File lib/redparse/node.rb, line 4418 def unparse o=default_unparse_options "elsif #{condition.unparse o}#{unparse_nl(consequent,o)}#{consequent.unparse o if consequent};" end