
messages.attributeDescriptions.methods.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grammar-kit Show documentation
Show all versions of grammar-kit Show documentation
Grammar-Kit library dedicated for language plugin developers.
The newest version!
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
// method mix-ins from SamplePsiImplUtil
evaluate toString
]
}
list ::= item + {
methods=[
element="item" // rename getItemList() method to getElementList()
// item="" // .. or suppress it completely
]
}
reference ::= id {
methods=[
// rename getId() to getNameIdentifier()
nameIdentifier="id"
// implement getReferences() API via mix-in
getReferences
]
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy