Package-level declarations
Types
Unicode character classification, and the narrower ASCII whitespace class the syntax rules are defined in.
Column arithmetic over raw source text.
An immutable view over the lines of a source, positioned at one of them. Recognizers receive a cursor and never mutate it, so no state is shared between them.
A cursor over a bounded slice of a source.
The outcome of looking for a {#custom-id} suffix.
Properties
What may precede a function call, as an alternation: the start of a line, whitespace, or a character that is not a letter, a digit, a dot or a backslash.
Highest indentation, in columns, a block-level construct may have before it becomes indented code.
Functions
A comment closes either abruptly, with > or -> right after the opening, or at the first -->.
Detects where a call may begin, without consuming anything. A call begins either at its own . followed by an identifier character, or at the { of a wrapped call.
The same rule as FUNCTION_CALL_PATTERN_BEFORE, as a predicate: the two must agree, since the compiler lexes with this one and the language server matches with that one.
Consumes a {#identifier} suffix.
Consumes a title enclosed in double quotes, single quotes or parentheses. A backslash escapes the next character, and the closing delimiter may not appear unescaped inside. The title may span lines, but not a blank one, since the construct it belongs to ends where a paragraph does.
Consumes a backslash and the character it escapes, which may not be a line terminator.
Consumes a one-line math expression. It opens with a dollar sign and one space or tab and closes with one space or tab and a dollar sign; an inner dollar sign belongs to the expression as long as it is not adjacent to whitespace.
Removes every comment, leaving the rest of the text untouched. A <!-- that never closes is text, not a comment, so it survives.