Docs.rs
  • sphinx-lang-0.8.1
    • sphinx-lang 0.8.1
    • Docs.rs crate page
    • MIT
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • mwerezak
    • Dependencies
      • ahash ^0.7.6 normal
      • clap ^3.1.6 normal
      • env_logger ^0.8.4 normal
      • log ^0.4.0 normal
      • once_cell ^1.10.0 normal
      • static_assertions ^1.1.0 normal
      • string-interner ^0.14 normal
      • test-log ^0.2.10 dev
    • Versions
    • 4.09% of the crate is documented
  • Go to latest version
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Badges
    • Builds
    • Metadata
    • Shorthand URLs
    • Download
    • Rustdoc JSON
    • Build queue
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation
logo

logo

LexerRule

Required Methods

  • current_state
  • get_token
  • reset
  • try_match

Implementors

In sphinx::lexer::rules

logo
Change settings

Trait sphinx::lexer::rules::LexerRule

source · [−]
pub trait LexerRule: __LexerRule_Clone {
    fn reset(&mut self);
    fn current_state(&self) -> MatchResult;
    fn try_match(&mut self, prev: Option<char>, next: char) -> MatchResult;
    fn get_token(&self) -> Result<Token, Box<dyn Error + 'static>>;
}

Required Methods

source

fn reset(&mut self)

source

fn current_state(&self) -> MatchResult

source

fn try_match(&mut self, prev: Option<char>, next: char) -> MatchResult

source

fn get_token(&self) -> Result<Token, Box<dyn Error + 'static>>

Implementors

source

impl LexerRule for BlockCommentRule

source

impl LexerRule for LineCommentRule

source

impl LexerRule for MultiCharRule

source

impl LexerRule for SingleCharRule

source

impl LexerRule for KeywordRule

source

impl LexerRule for StringLiteralRule

source

impl LexerRule for FloatLiteralRule

source

impl LexerRule for IdentifierRule

source

impl LexerRule for IntegerLiteralRule

source

impl LexerRule for LabelRule

source

impl LexerRule for PrefixedIntegerLiteralRule