sourcepawn_lexer

Crates.iosourcepawn_lexer
lib.rssourcepawn_lexer
version0.2.1
sourcesrc
created_at2023-06-02 16:20:48.337551
updated_at2024-07-23 04:07:45.188369
descriptionLossless SourcePawn lexer
homepage
repositoryhttps://github.com/Sarrus1/sourcepawn-lexer
max_upload_size
id881016
size41,875
Charles (Sarrus1)

documentation

https://docs.rs/sourcepawn_lexer

README

Sourcepawn Lexer

Lossless Sourcepawn lexer build using Logos

Crates.io Crates.io Github release status Code coverage GitHub

Example

use sourcepawn_lsp::lexer::SourcepawnLexer;

fn main() {
    let lexer = SourcepawnLexer::new("int foo = 0;");
    for token in lexer {
        match token.token_kind {
            TokenKind::Literal(_) | TokenKind::Comment(_) => println("{:#?}", token.text()),
            _ => (),
        }
    }
}
Commit count: 43

cargo fmt