Class: Plasma::Interpreter::IfNode
- Inherits:
-
PlasmaNode
- Object
- Treetop::Runtime::SyntaxNode
- PlasmaNode
- Plasma::Interpreter::IfNode
- Defined in:
- lib/plasma/interpreter/plasma_grammarnode.rb
Instance Method Summary collapse
Methods inherited from PlasmaNode
Instance Method Details
#evaluate(env) ⇒ Object
274 275 276 277 278 279 280 281 282 |
# File 'lib/plasma/interpreter/plasma_grammarnode.rb', line 274 def evaluate(env) if pred.evaluate(env) body.evaluate(env) elsif respond_to?(:maybe) maybe.other.evaluate(env) else nil end end |