anvil.script.statements
Class ForStatement

java.lang.Object
  |
  +--anvil.script.statements.Statement
        |
        +--anvil.script.statements.ScopedStatement
              |
              +--anvil.script.statements.ForStatement
All Implemented Interfaces:
Labeled

public class ForStatement
extends ScopedStatement
implements Labeled

class ForStatement


Field Summary
 
Fields inherited from class anvil.script.statements.Statement
CONTENT_COMPRESS, CONTENT_PACK, CONTENT_PRESERVE, CONTENT_PROCESSING, CONTENT_SILENT, DEFAULT_NAMESPACE, EMPTY, ST_ASSERT, ST_BLOCK, ST_BREAK, ST_CALL, ST_CASE, ST_CATCH, ST_CDATA, ST_CLASS, ST_COMPRESS, ST_CONST, ST_CONTINUE, ST_CUSTOM_TAG, ST_DEFAULT, ST_DO, ST_DOCUMENT, ST_ELSE, ST_ELSEIF, ST_ENDCASE, ST_ENDCLASS, ST_ENDCONST, ST_ENDDEFAULT, ST_ENDEVAL, ST_ENDFOR, ST_ENDFOREACH, ST_ENDFUNCTION, ST_ENDIF, ST_ENDINNER, ST_ENDMODULE, ST_ENDNAMESPACE, ST_ENDOUTER, ST_ENDREPLACE, ST_ENDSWITCH, ST_ENDVAR, ST_ENDWHILE, ST_EVAL, ST_EXIT, ST_FINALLY, ST_FOR, ST_FOREACH, ST_FUNCTION, ST_IF, ST_IMPLICIT_BLOCK, ST_IMPORT, ST_INNER, ST_INTERFACE, ST_INVALID, ST_INVOKE, ST_MODULE, ST_NAMESPACE, ST_NONE, ST_OUTER, ST_PACK, ST_PRESERVE, ST_PRINT, ST_REPLACE, ST_RETURN, ST_SILENT, ST_SWITCH, ST_SYNCHRONIZED, ST_TAG, ST_THROW, ST_TRY, ST_VAR, ST_WHILE, ST_YIELD
 
Constructor Summary
ForStatement(Statement parent, Location location)
           
ForStatement(Statement parent, Location location, Expression[] init, Expression condition, Expression[] action, java.lang.String label)
           
 
Method Summary
 void check(ErrorListener context)
           
 void compile(ByteCompiler context)
           
 Jumps eliminate(ErrorListener context)
           
 Statement getChildStatement()
           
 Source getEndOfScope()
           
 java.lang.String getLabel()
           
 Source getStartOfScope()
           
 java.lang.String name()
           
 boolean onTag(TemplateParser parser, int type, Tag tag)
           
 void parse(TemplateParser parser, Tag tag)
           
 void setChildStatement(Statement statement)
           
 int typeOf()
           
 
Methods inherited from class anvil.script.statements.ScopedStatement
hasEnd, isBlocked, parseCondition
 
Methods inherited from class anvil.script.statements.Statement
addChild, allowBreak, allowContinue, allowLabel, allowYield, callFinalizer, compress, getBlockStatement, getCatchStatement, getClassStatement, getContentState, getDefinitionStatement, getFunctionStatement, getInterfaceStatement, getLabelDepth, getLabeled, getLocation, getModuleStatement, getParentStatement, getScopeStatement, getStaticContent, getSwitch, getTag, getTagId, getTypeRef, hasStaticContent, importExternals, isDeclared, isStaticRegion, lookupAnyDeclaration, onCharacters, onProcessingInstruction, pack, parseLabel, setLocation, setParentStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ForStatement

public ForStatement(Statement parent,
                    Location location)

ForStatement

public ForStatement(Statement parent,
                    Location location,
                    Expression[] init,
                    Expression condition,
                    Expression[] action,
                    java.lang.String label)
Method Detail

typeOf

public int typeOf()
Overrides:
typeOf in class Statement

name

public java.lang.String name()
Overrides:
name in class Statement

getLabel

public java.lang.String getLabel()
Specified by:
getLabel in interface Labeled

parse

public void parse(TemplateParser parser,
                  Tag tag)
Overrides:
parse in class Statement

onTag

public boolean onTag(TemplateParser parser,
                     int type,
                     Tag tag)
Overrides:
onTag in class Statement

getChildStatement

public Statement getChildStatement()
Overrides:
getChildStatement in class Statement

setChildStatement

public void setChildStatement(Statement statement)
Overrides:
setChildStatement in class Statement

check

public void check(ErrorListener context)
Overrides:
check in class Statement

eliminate

public Jumps eliminate(ErrorListener context)
Overrides:
eliminate in class Statement

getStartOfScope

public Source getStartOfScope()
Specified by:
getStartOfScope in interface Labeled

getEndOfScope

public Source getEndOfScope()
Specified by:
getEndOfScope in interface Labeled

compile

public void compile(ByteCompiler context)
Overrides:
compile in class Statement