Generate utility method to check if a List child is non-empty

Issue #130 resolved
Jesper Öqvist created an issue

It would be useful if JastAdd generated a utility method for each list child to check if the list contains at least one item. Example:

A ::= B*;

New utility method code:

public boolean A.hasB() {
    return getNumB() > 0;
}

And add

public boolean List.isEmpty() { ... }

Comments (6)

  1. Log in to comment