pub enum PreToken {
BlankLine,
LineEnd,
WordEnd,
IndentStart,
IndentEnd,
LineSpacingPolicy(TriviaBlankLineSpacingPolicy),
Literal(Rc<String>, SyntaxKind),
Trivia(Trivia),
TempIndentStart,
TempIndentEnd,
}Expand description
A token that can be written by elements.
These are tokens that are intended to be written directly by elements to a
TokenStream consisting of PreTokens. Note that
this will transformed into a TokenStream of
PostTokens by a
Postprocessor (authors of elements are never
expected to write PostTokens directly).
Variants§
BlankLine
A non-trivial blank line.
This will not be ignored by the postprocessor (unlike
Trivia::BlankLine which is potentially ignored).
LineEnd
The end of a line.
WordEnd
The end of a word.
IndentStart
The start of an indented block.
IndentEnd
The end of an indented block.
LineSpacingPolicy(TriviaBlankLineSpacingPolicy)
How to handle trivial blank lines from this point onwards.
Literal(Rc<String>, SyntaxKind)
Literal text.
Trivia(Trivia)
Trivia.
TempIndentStart
A temporary indent start. Used in command section formatting.
Command sections must account for indentation from both the WDL context and the embedded Bash context, so this is used to add additional indentation from the Bash context.
TempIndentEnd
A temporary indent end. Used in command section formatting.
See PreToken::TempIndentStart for more information.