Crate synoptic

source ·

Structs§

  • An atom is a portion of text within a document that is significant. An atom only covers one line. Atoms cover keywords as well as start and end indicators for bounded tokens E.g., in a string, the atoms would be the starting “ and the ending “
  • A definition of an Atom See Atom for more information
  • Definition for a bounded token, these are tokens that can cover multiple lines. Things like multiline comments and strings are examples of this. They work well for buffering files where you are unaware of where the end indicator may be as it occurs further down in the file.
  • This is the main struct that will highlight your document
  • Represents a point in a 2d space
  • A compiled regular expression for searching Unicode haystacks.

Enums§

  • The kind of atom being represented
  • This is an enum for representing tokens.
  • This is a TokenRef, which contains detailed information on what a token is

Functions§

  • This will find all occurances of a string in a document (and return character indices)
  • Function to obtain a syntax highlighter based on a file extension
  • Trim utility function to trim down a line of tokens to offset text