[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FW: Confusion
I think I have partly realized my mistake. I think I should be simply doing
PBlock block = node.getBlock();
block.apply(this);
and relying on caseABlock to deal with the block. The problem is that I
want to emit
code either side of each statement within the block. Should I
1) detect from within caseABlock that the parent is my ParStatement (or
something similar)
or
2) create a whole new production for a block that is effectively a copy of
the original with a different name and implement this special behaviour in
caseANewBlock?
I suspect 2) is the correct way to go, but I need some pointers!
Thanks
Jim Moores