* <pre>
* group [ inherit somePropertyName ] [ groupDefinition ];
* </pre>
*/
Rule Group() {
final Var<GroupBlock> var = new Var<GroupBlock>(new GroupBlock());
return Sequence(
"group",
MaybeInherit(Property.class, var),
ZeroOneOrBlock(GroupDefinition(), GroupDefinition.class),
new Action<Object>() {
@Override
@SuppressWarnings("unchecked")
public boolean run(Context<Object> ctx) {
GroupBlock x = var.get();
x.setDefinitions((List<GroupDefinition>) pop());
push(x);
return true;
}
});
}