/*
* Declaration syntax follows.
*/
final public Schema NamedSchemaDeclaration() throws ParseException {
Schema s;
Map<String, JsonNode> props = new LinkedHashMap<String, JsonNode>();
String savedSpace = this.namespace;
label_1:
while (true) {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case AT:
;
break;
default:
jj_la1[2] = jj_gen;
break label_1;
}
SchemaProperty(props);
}
if (props.containsKey("namespace"))
this.namespace = getTextProp("namespace", props, token);
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case FIXED:
s = FixedDeclaration();
break;
case ENUM:
s = EnumDeclaration();
break;
case ERROR:
case RECORD:
s = RecordDeclaration();
break;
default:
jj_la1[3] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
this.namespace = savedSpace;
for (String key : props.keySet())
if ("namespace".equals(key)) { // already handled: ignore
} else if ("aliases".equals(key)) { // aliases
for (String alias : getTextProps("aliases", props, token))
s.addAlias(alias);
} else if (props.get(key).isTextual()) { // ignore other non-textual
s.addProp(key, getTextProp(key, props, token));
}
{if (true) return s;}
throw new Error("Missing return statement in function");
}