sjm.examples.sling
Class ForAssembler
java.lang.Object
|
+--sjm.parse.Assembler
|
+--sjm.examples.sling.ForAssembler
- public class ForAssembler
- extends Assembler
Builds a "for" command from elements on the stack, which
should be: a variable, a "from" function, a "to" function,
a '{' token, and a series of commands.
This class uses the curly brace as a fence, popping
commands above it and creating a composite command from
these commands. This composite command is the body of the
"for" loop. This assembler pops the "from" and "to"
functions and the variable, constructs a
ForCommand object, and pushes it.
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ForAssembler
public ForAssembler()
popCommandSequence
protected static CommandSequence popCommandSequence(Assembly a)
workOn
public void workOn(Assembly a)
- Pop the elements of a "for" loop, construct a
ForCommand, and push it.
- Overrides:
- workOn in class Assembler
- Parameters:
Assembly - the assembly to work on