CGA Grammar: case/else

Idea created by thyandrecardoso on Mar 5, 2012
    New
    Score110
    Would be nice to allow statements outside the case/else construct.

    For example, this is NOT allowed (to my knowledge):
    Lot -->
        set(material.name, "diffuse")
        case attrHello == 1:
             Building
        else:
             Garden

    while this IS valid:
    Lot -->
        case attrHello == 1:
             set(material.name, "diffuse")
             Building
        else:
             set(material.name, "diffuse")
             Garden

    This is a very simple (dummy) example. However, for complex things, this restriction becomes very annoying, and turns your code very verbose and unclean.
    You could put the common code in a intermediate rule but, again, you're writing code which is becoming unreadable

    Thanks,
    André