Child pages
  • RuleAttribute
Skip to end of metadata
Go to start of metadata

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 with SpanClass which specifies the highlighting class. SpanClass should be declared in advance with the SpanClass directive.
  • ExplicitSpaces – suppresses whitespace rules auto placement and lets you specify them explicitly.
  • ImplicitSpaces – opposite of  ExplicitSpaces.
  • SuppressTrailingSpaces – suppresses a space followed by the rule marked with this attribute.
  • AllowTrailingSpaces – opposite of SuppressTrailingSpaces.
  • NoAst – suppresses AST creation for the rule marked with this attribute.
  • Key – lets you specify TokenRule and ExtensibleTokenRule 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.
  • No labels