}
}
definitions.appendChild(new ExpressionStmt(unk, (Expression)
QuasiBuilder.substV(
"html4.ATTRIBS = { @k*: @v* };",
"k", new ParseTreeNodeContainer(keys),
"v", new ParseTreeNodeContainer(values))));
}
definitions.appendChild(mapFromEnum(
EnumSet.allOf(EFlag.class),
"eflags",
new Function<EFlag, String>() {
public String apply(EFlag f) {
return f.name();
}
},
new Function<EFlag, Integer>() {
public Integer apply(EFlag f) {
return f.bitMask;
}
})
);
{
List<StringLiteral> keys = new ArrayList<StringLiteral>();
List<IntegerLiteral> values = new ArrayList<IntegerLiteral>();
for (Map.Entry<ElKey, EnumSet<EFlag>> e : eflags.entrySet()) {
ElKey key = e.getKey();
int value = 0;
for (EFlag f : e.getValue()) { value |= f.bitMask; }
keys.add(StringLiteral.valueOf(unk, key.toString()));
values.add(new IntegerLiteral(unk, value));
}
definitions.appendChild(new ExpressionStmt(unk, (Expression)
QuasiBuilder.substV(
"html4.ELEMENTS = { @k*: @v* };",
"k", new ParseTreeNodeContainer(keys),
"v", new ParseTreeNodeContainer(values))));
}
definitions.appendChild(mapFromEnum(
EnumSet.allOf(UriEffect.class),
"ueffects",