// last, those with default must be first)
public ArgumentDeclaration handleArgumentDeclaration(HiddenTokenAwareTree token) {
List<HiddenTokenAwareTree> children = token.getChildren();
HiddenTokenAwareTree firstChild = children.get(0);
if (firstChild.getType() == LessLexer.DOT3)
return new ArgumentDeclaration(firstChild, new Variable(firstChild, "@"), null, true);
HiddenTokenAwareTree name = firstChild;
if (children.size() == 1)
return new ArgumentDeclaration(token, new Variable(name, name.getText()), null);
HiddenTokenAwareTree separator = children.get(1);
if (separator.getType() == LessLexer.DOT3) {
return new ArgumentDeclaration(token, new Variable(name, name.getText()), null, true);
}
HiddenTokenAwareTree expression = children.get(2);
separator.giveHidden(name, expression);
return new ArgumentDeclaration(token, new Variable(name, name.getText()), (Expression) switchOn(expression));
}