Expand description
Syntax tree definitions with change metadata.
Structs
- Fields that are common to both
Syntax::ListandSyntax::Atom.
Enums
- AtomKind 🔒
- A matched token (an atom, a delimiter, or a comment word).
- Different types of strings. We want to diff these the same way, but highlight them differently.
- Syntax 🔒
- Unlike atoms, tokens can be delimiters like
{.
Functions
- Walk
nodesand return a vec of all the changed positions. - dbg_pos 🔒
- Skip line spans at the beginning or end that have zero width.
- Assumes that
set_content_idhas already run. - Are there sufficient common words that we should only highlight individual changed words?
- Initialise all the fields in
SyntaxInfo. - Set all the
SyntaxInfovalues for all therootson a single side (LHS or RHS). - set_prev 🔒For every syntax node in the tree, mark the previous node according to a preorder traversal.
- Given the text
contentfrom a comment or string, split it intoMatchedPosvalues for the novel and unchanged words. - Zip
lhswithrhs, but repeat the last item from the shorter slice.
Type Aliases
- SyntaxId 🔒