Custom PSI accessors and method mix-ins. See documentation and HOWTO for more.
Examples:
{
psiImplUtilClass="com.sample.SamplePsiImplUtil"
tokens=[
OP_PLUS='+'
]
}
sum_expr ::= expr '+' expr {
methods=[
// user PSI accessors for sub-rules and tokens:
left="/expr[0]" // will be @NotNull as far as we have "+" in the expression
right="/expr[1]" // "expr" is the name of the auto-calculated child property (singular or list)
op="/OP_PLUS" // explicit token accessor
// user implementation methods from SamplePsiImplUtil class, i.e. "method mixin"s
getReferences evaluate toString
]
}