| super(name);
}
public void testTryCatchStatement() throws CompilerException {
assertParserOutput(
new TryStatement(
new BlockStatement(
new Statement[] {
new ExpressionStatement(
new Identifier("something")
)
}
),
new Identifier("foo"),
new BlockStatement(
new Statement[] {
new ExpressionStatement(
new Identifier("bar")
)
}
),
null
),
"try {something;} catch (foo) {bar;}"
);
assertParserOutput(
new TryStatement(
new BlockStatement(
new Statement[] {
new ExpressionStatement(
new Identifier("something")
)
}
),
null,
null,
new BlockStatement(
new Statement[] {
new ExpressionStatement(
new Identifier("baz")
)
}
)
),
"try {something;} finally {baz;}"
);
assertParserOutput(
new TryStatement(
new BlockStatement(
new Statement[] {
new ExpressionStatement(
new Identifier("something")
)
|