jcaas.script_nodes
Class IfStatement
java.lang.Object
jcaas.script_nodes.AbstractInterpretable
jcaas.script_nodes.Statement
jcaas.script_nodes.IfStatement
- All Implemented Interfaces:
- Interpretable
public class IfStatement
- extends Statement
This class represents the if_stmt node in the syntax tree of a script.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IfStatement
public IfStatement(LogicalExpression exp,
Statement l1)
- Constructor for the rule if_stmt ::= ( logical_exp ) { stmt_list }
- Parameters:
exp
- the logical_exp to evaluate to determine if the stmt_list should
be evaluated.l1
- the stmt_list.
IfStatement
public IfStatement(LogicalExpression exp,
Statement l1,
Statement l2)
- Constructor for te rule if_stmt ::= ( logical_exp ) { stmt_list } else { stmt_list }.
- Parameters:
exp
- the logical_exp to evaluate to determine which stmt_list to evaluate.l1
- stmt_list to evaluate if logical_exp is true.l2
- stmt_list to evaluate if logical_exp is false.
interpret
public void interpret(Context c)