Module syntect::parsing [−][src]
Everything about parsing text into text annotated with scopes.
The most important struct here is SyntaxSet
, check out the docs for that.
Re-exports
pub use self::syntax_definition::SyntaxDefinition; |
Modules
syntax_definition |
This module contains data structures for representing syntax definitions. Everything is public because I want this library to be useful in super integrated cases like text editors and I have no idea what kind of monkeying you might want to do with the data. Perhaps parsing your own syntax format into this data structure? |
Structs
MatchPower |
Wrapper to get around the fact Rust f64 doesn't implement Ord and there is no non-NaN float type |
ParseState |
Keeps the current parser state (the internal syntax interpreter stack) between lines of parsing. If you are parsing an entire file you create one of these at the start and use it all the way to the end. |
SCOPE_REPO |
The global scope repo, exposed in case you want to minimize locking and unlocking.
Shouldn't be necessary for you to use. See the |
Scope |
A hierarchy of atoms with semi-standardized names used to accord semantic information to a specific piece of text. Generally written with the atoms separated by dots. By convention atoms are all lowercase alphanumeric. |
ScopeRepository |
The structure used to keep track of the mapping between scope atom numbers
and their string names. It is only exposed in case you want to lock
|
ScopeStack |
A stack/sequence of scopes. This is used both to represent hierarchies for a given
token of text, as well as in |
SyntaxReference | |
SyntaxSet |
A syntax set holds multiple syntaxes that have been linked together. |
SyntaxSetBuilder |
A syntax set builder is used for loading syntax definitions from the file
system or by adding |
Enums
BasicScopeStackOp |
Used for |
ClearAmount | |
ParseScopeError |
Not all strings are valid scopes |
ParseSyntaxError | |
ScopeStackOp |
A change to a scope stack. Generally |
Constants
ATOM_LEN_BITS |
Multiplier on the power of 2 for MatchPower. Only useful if you compute your own MatchPower scores. |