Package org.qdl_lang.statements
Class ConditionalStatement
- java.lang.Object
-
- org.qdl_lang.statements.ConditionalStatement
-
- All Implemented Interfaces:
Serializable
,Statement
public class ConditionalStatement extends Object implements Statement
Created by Jeff Gaynor
on 1/17/20 at 3:34 PM- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ConditionalStatement(TokenPosition tokenPosition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
evaluate(State state)
ExpressionNode
getConditional()
List<Statement>
getElseArguments()
List<Statement>
getIfArguments()
List<String>
getSourceCode()
TokenPosition
getTokenPosition()
boolean
hasTokenPosition()
void
setConditional(ExpressionNode conditional)
void
setElseArguments(List<Statement> elseArguments)
void
setIfArguments(List<Statement> ifArguments)
void
setSourceCode(List<String> sourceCode)
void
setTokenPosition(TokenPosition tokenPosition)
Set the location of this token from the parser.
-
-
-
Constructor Detail
-
ConditionalStatement
public ConditionalStatement(TokenPosition tokenPosition)
-
-
Method Detail
-
setTokenPosition
public void setTokenPosition(TokenPosition tokenPosition)
Description copied from interface:Statement
Set the location of this token from the parser. This is used for error notifications later.- Specified by:
setTokenPosition
in interfaceStatement
-
getTokenPosition
public TokenPosition getTokenPosition()
- Specified by:
getTokenPosition
in interfaceStatement
-
hasTokenPosition
public boolean hasTokenPosition()
- Specified by:
hasTokenPosition
in interfaceStatement
-
getConditional
public ExpressionNode getConditional()
-
setConditional
public void setConditional(ExpressionNode conditional)
-
getSourceCode
public List<String> getSourceCode()
- Specified by:
getSourceCode
in interfaceStatement
-
setSourceCode
public void setSourceCode(List<String> sourceCode)
- Specified by:
setSourceCode
in interfaceStatement
-
-