| super(name);
}
public void testFunctionDeclaration() throws CompilerException {
assertParserOutput(
new FunctionDeclaration(
new FunctionLiteral(
new Identifier("foo"),
new Identifier[] {
},
new Statement[] {
}
)
),
"function foo() {};"
);
assertParserOutput(
new FunctionDeclaration(
new FunctionLiteral(
new Identifier("foo"),
new Identifier[] {
new Identifier("a"),
},
new Statement[] {
}
)
),
"function foo(a) {}"
);
assertParserOutput(
new FunctionDeclaration(
new FunctionLiteral(
new Identifier("foo"),
new Identifier[] {
new Identifier("a"),
new Identifier("b"),
new Identifier("c"),
},
new Statement[] {
}
)
),
"function foo(a, b, c) {};"
);
assertParserOutput(
new FunctionDeclaration(
new FunctionLiteral(
new Identifier("a"),
new Identifier[] {
},
new Statement[] {
new FunctionDeclaration(
new FunctionLiteral(
new Identifier("b"),
new Identifier[] {
},
new Statement[] {
|