Module syntect::parsing

source ·
Expand description

Everything about parsing text into text annotated with scopes.

The most important struct here is SyntaxSet, check out the docs for that.

Re-exports§

Modules§

Structs§

  • Wrapper to get around the fact Rust f64 doesn’t implement Ord and there is no non-NaN float type
  • Keeps the current parser state (the internal syntax interpreter stack) between lines of parsing.
  • An abstraction for regex patterns.
  • A region contains text positions for capture groups in a match result.
  • A hierarchy of atoms with semi-standardized names used to accord semantic information to a specific piece of text.
  • The structure used to keep track of the mapping between scope atom numbers and their string names
  • A stack/sequence of scopes for representing hierarchies for a given token of text
  • A linked version of a SyntaxDefinition that is only useful as part of the SyntaxSet that contains it. See docs for SyntaxSetBuilder::build for more info.
  • A syntax set holds multiple syntaxes that have been linked together.
  • A syntax set builder is used for loading syntax definitions from the file system or by adding SyntaxDefinition objects.

Enums§

Constants§

  • Multiplier on the power of 2 for MatchPower. This is only useful if you compute your own MatchPower scores

Statics§

  • The global scope repo, exposed in case you want to minimize locking and unlocking.