Registry / other / logos-derive

logos-derive

JSON →
library0.16.1rscratesunverified

Create ridiculously fast Lexers using derive macros.

# Cargo.toml [dependencies] logos-derive = "0.16.1"
INSTALL
IMPORT
SIG · LOGOS-DERIVE
L
logos-derive
otherrustv0.16.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Logos
use logos_derive::Logos;

Define a token enum and lex a string.

use logos_derive::Logos; #[derive(Logos)] enum Token { #[token("hello")] Hello, #[error] Error, } let mut lex = Token::lexer("hello"); assert_eq!(lex.next(), Some(Ok(Token::Hello)));
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.16.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
logos-derive — cargo add logos-derive · libregistry