Package org.qdl_lang.statements
Class WhileLoop
- java.lang.Object
-
- org.qdl_lang.statements.WhileLoop
-
- All Implemented Interfaces:
Serializable
,Statement
public class WhileLoop extends Object implements Statement
Created by Jeff Gaynor
on 1/17/20 at 4:44 PM- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WhileLoop()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
doBasicWhile(State localState)
protected Object
doForLoop(State localState)
protected Object
doPostLoop(State localState)
Object
evaluate(State state)
protected Object
forKeysOrValuesLoop(State localState, boolean doKeys)
for_keys(var, stem.) -- Loop over the keys in a given stem, assigning each to the var.ExpressionNode
getConditional()
List<String>
getSourceCode()
List<Statement>
getStatements()
TokenPosition
getTokenPosition()
boolean
hasTokenPosition()
void
setConditional(ExpressionNode conditional)
void
setSourceCode(List<String> sourceCode)
void
setStatements(List<Statement> statements)
void
setTokenPosition(TokenPosition tokenPosition)
Set the location of this token from the parser.
-
-
-
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)
-
forKeysOrValuesLoop
protected Object forKeysOrValuesLoop(State localState, boolean doKeys)
for_keys(var, stem.) -- Loop over the keys in a given stem, assigning each to the var.- Parameters:
localState
-- Returns:
-
getSourceCode
public List<String> getSourceCode()
- Specified by:
getSourceCode
in interfaceStatement
-
setSourceCode
public void setSourceCode(List<String> sourceCode)
- Specified by:
setSourceCode
in interfaceStatement
-
-