| super(name);
}
public void testForInStatement() throws CompilerException {
assertParserOutput(
new ForInStatement(
new Identifier("foo"),
new ArrayLiteral(
new Expression[] {
new NumberLiteral(1.0),
new NumberLiteral(2.0),
new NumberLiteral(3.0),
new NumberLiteral(4.0)
}
),
new EmptyStatement()
),
"for (foo in [1, 2, 3, 4]);"
);
assertParserOutput(
new ForInStatement(
new PropertyExpression(
new Identifier("foo"),
new StringLiteral("bar")
),
new ArrayLiteral(
new Expression[] {
new NumberLiteral(1.0),
new NumberLiteral(2.0),
new NumberLiteral(3.0),
new NumberLiteral(4.0)
}
),
new EmptyStatement()
),
"for (foo.bar in [1, 2, 3, 4]);"
);
assertParserOutput(
new ForInStatement(
new VariableDeclaration(
new Identifier("foo"),
null
),
new ArrayLiteral(
|