Crates.io | sourcepawn_lexer |
lib.rs | sourcepawn_lexer |
version | 0.2.1 |
source | src |
created_at | 2023-06-02 16:20:48.337551 |
updated_at | 2024-07-23 04:07:45.188369 |
description | Lossless SourcePawn lexer |
homepage | |
repository | https://github.com/Sarrus1/sourcepawn-lexer |
max_upload_size | |
id | 881016 |
size | 41,875 |
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()),
_ => (),
}
}
}