petdance/scratch — Issue #83: [pmc2c] don't require custom #defines for private flags
Author: petdance
Created: 2011-11-01 04:24:48+00:00
State: open

It'd be nice if pmc2c didn't require that custom private PObj flags be #defined, but rather provided a way to declare them as part of the pmclass declaration. The syntax could look something like this:
{{{
pmclass FooClass
group FooGroup
extends FooBase {

ATTR PMC *foo;
ATTR INTVAL *bar;

FLAG FOO_IS_HAVING_A_GOOD_DAY;
FLAG FOO_IS_WEARING_YELLOW;
}}}

This would be a good introductory task for someone wanting to get into Parrot since it's not urgent and wouldn't cause any compatibility breaks. The majority of the code that would need to be changed is in lib/Parrot/Pmc2c/Parser.pm and lib/Parrot/Pmc2c/PMCEmitter.pm .