{
return new Binding(rule, varTree.getText());
}
case COLON:
{
ParseNode child0 = (ParseNode)varTree.getChild(0);
ParseNode child1 = (ParseNode)varTree.getChild(1);
if (child0.getTag() != IDENTIFIER) {
throw new TypeException("Event.createBindings : unexpected token type in variable declaration" + child0.getTag() + " for token " + child0.getText() + child0.getPos());
} else if (child1.getTag() != IDENTIFIER && child1.getTag() != ARRAY) {
throw new TypeException("Event.createBindings : unexpected token Type in variable type declaration" + child1.getTag() + " for token " + child1.getText() + child1.getPos());
}
Type type = getBindingType(child1);
if (type == null) {
throw new TypeException("Event.createBindings : incompatible type in declaration of variable " + child1.getText() + child1.getPos());
}
return new Binding(rule, child0.getText(), type);
}
default:
{