// usage: @Extern(language, name, nameImport, serializer, serializerImport)
// example: @Extern(java, "java.util.Date", "", "etch.bindings.java.util.DateSerializer", "")
if (args.length != 5)
throw new ParseException( String.format(
"usage: @Extern(language, \"xname\", \"xnameImport\", \"serializer\", \"serializerImport\") at line %d",
name.token.beginLine ) );
language = args[0];
xname = args[1];
xnameImport = args[2];
serializer = args[3];
serializerImport = args[4];
if (language.kind != EtchGrammarConstants.ID)
throw new ParseException( String.format(
"Extern expected language to be <ID> at line %d",
language.beginLine ) );
if (xname.kind != EtchGrammarConstants.STR)
throw new ParseException( String.format(
"Extern expected xname to be <STR> at line %d",
xname.beginLine ) );
if (xnameImport.kind != EtchGrammarConstants.STR)
throw new ParseException( String.format(
"Extern expected xnameImport to be <STR> at line %d",
xnameImport.beginLine ) );
if (serializer.kind != EtchGrammarConstants.STR)
throw new ParseException( String.format(
"Extern expected serializer to be <STR> at line %d",
serializer.beginLine ) );
if (serializerImport.kind != EtchGrammarConstants.STR)
throw new ParseException( String.format(
"Extern expected serializerImport to be <STR> at line %d",
serializerImport.beginLine ) );
}