Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[xtext-dev] generated CA methods name collision

copied from https://bugs.eclipse.org/bugs/show_bug.cgi?id=261364
-------------------------------------------------------------------------
Model :
        (elements+=Element+);

Element :
        Foo | FooName;

Foo :
        "foo" nameX=ID;

FooName :
        "bar" x=ID;

Which leads in (only!) one  completeFooNameX Method in Both cases which might
be inappropriate because there may be two complete diffenent things to assign.
------------------------------------------------------------------

we could detect such name collisions and use a separator character
('_' or '$' for generated names??) between the rule and the assignment
('completeFooName_X')..what do you think?

note: RULE_ID is not allowed to start with '$'

m


Back to the top