Documentation
¶
Overview ¶
Package keywords groups the lexer's reserved words and contextual words into the categories editor highlighting colours them by. Every editor surface reads its keyword lists from here, so they cannot drift from the lexer or from each other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contextual ¶
Contextual returns the words the parser reads as syntax positionally in a language without the lexer reserving them, in name order. It fails when one is also reserved: the two lists exist precisely to be disjoint, and that is what stops a contextual word leaking into source.Keywords().
func Introducers ¶
Introducers returns the reserved words that are directly followed by the name a declaration introduces. It fails when one is no longer reserved.
Types ¶
type Category ¶
type Category string
Category is the kind of syntax a keyword group introduces.
const ( Constant Category = "constant" Declaration Category = "declaration" Control Category = "control" Modifier Category = "modifier" Relationship Category = "relationship" Operator Category = "operator" // Other holds every reserved word no group claims, so a new keyword is // highlighted without an editor change. It is absent while every keyword is // grouped. Other Category = "other" )
The categories, in the order editors apply them.