
messages.attributeDescriptions.extends.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!
Base implementation class or super rule for PSI classes. AST nodes produced by rules extending the same rule will be collapsed by parser.
Examples:
{
extends(".*_expr")=expr
}
// due to "extends" attribute the AST is "flat"
expr ::= assign_expr
| conditional_group
| add_group
| between_expr
| mul_group
| unary_group
| exp_expr
| factorial_expr
| call_expr
| ref_expr
| primary_group
// improve PSI class hierarchy with common BinaryExpr class
// no parsing code is generated for fake rules
fake binary_expr ::= expression + {
methods = [
left="expression[0]"
right="expression[1]"]
}
add_expr ::= expr '+' expr {extends=binary_expr}
// stubs
stub_element ::= {extends="com.sample.StubBase>" stubClass="com.sample.StubElementStub"}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy