Remove multiple value expressions per contributes statement

Issue #250 resolved
Jesper Öqvist created an issue

JastAdd 2.1.13

JastAdd has a feature in collection attribute contribution statements that seems to be undocumented and which I not seen used in any JastAdd project. This feature is multiple value expressions per contributes statement. For example:

import java.util.LinkedList;

aspect Test {
  coll LinkedList<Leaf> Tree.leaves() [new LinkedList<Leaf>()];

  Leaf contributes this, this, this to Tree.leaves();
}

The above aspect generates working code with JastAdd 2.1.13-88-g8ebdc36. However, since this feature is not documented and not tested, and there seems to be no current uses for this feature, I propose that it should be removed. The reasons for removing the feature are:

  • To simplify code generation
  • To not have to test or document the feature

One can easily achieve the same result just by splitting up the contributions in individual statements, and that does not add much extra code.

Comments (2)

  1. Jesper Öqvist reporter

    Remove multiple value per contribution

    Improved multi-value contributions by supporting iterable values (not only Collection subtypes).

    Removed the undocumented multiple value-expression feature for contribution statements.

    fixes #249 (bitbucket) fixes #250 (bitbucket)

    → <<cset 68043566275d>>

  2. Log in to comment