Annotation on constructor

Issue #270 resolved
Alfred Åkesson created an issue

Add annotation to the constructor of a node, so that you can find out what argument correspond to what child or token.

The following in the abstract grammar:

A ::= b:B <c> [D] E*;

Would generate:

@ASTNodeAnnotation.Constructor(
    name = {"b","c","D","E"} ,
    type = {"B", "String" , "Opt<D>", " List<E>"},
    kind = {"Child","Token","Opt","List"}
)
public A(B p0, String p1, Opt<D> p2, List<E> p3) 

Comments (1)

  1. Log in to comment