Class Farts::IfSyntaxNode
In: lib/farts/farts_parser.rb
Parent: SyntaxNode
SyntaxNode
LiteralSyntaxNode
ProgramSyntaxNode
AttributeSyntaxNode
IfSyntaxNode
CommentSyntaxNode
EndSyntaxNode
LocalVarSyntaxNode
CallSyntaxNode
CommandSyntaxNode
Racc::Parser
Parser
StringScanner
Lexer
Lib
Interpreter
Farts
dot/f_21.png

Methods

execute   new  

Public Class methods

[Source]

# File lib/farts/farts_parser.rb, line 735
    def initialize( lineno, condition, stmts_true, stmts_false )
      super lineno
      @condition = condition
      @stmts_true = stmts_true
      @stmts_false = stmts_false
    end

Public Instance methods

[Source]

# File lib/farts/farts_parser.rb, line 742
    def execute(intp)
      if @condition.execute(intp)
        exec_list(intp, @stmts_true)
      else
        exec_list(intp, @stmts_false) if @stmts_false
      end
    end

[Validate]