Attributes of the rules.
StartRule
– tells the Nitra compiler to create a static method that simplifies the parsing starting from the rule marked by this attribute.SpanClass
– marks the rule withSpanClass
which specifies the highlighting class.SpanClass
should be declared in advance with theSpanClass
directive.ExplicitSpaces
– suppresses whitespace rules auto placement and lets you specify them explicitly.ImplicitSpaces
– opposite ofExplicitSpaces
.SuppressTrailingSpaces
– suppresses a space followed by the rule marked with this attribute.AllowTrailingSpaces
– opposite ofSuppressTrailingSpaces
.NoAst
– suppresses AST creation for the rule marked with this attribute.Key
– lets you specifyTokenRule
andExtensibleTokenRule
as the rules that determine syntax structure. That impacts error recovery, making the parser create a "broken down" AST if keywords from the recovered rule have been encountered.