Skip to content

Instantly share code, notes, and snippets.

View leizaf's full-sized avatar

Lei leizaf

  • Anduril
  • Irvine, CA
View GitHub Profile
@leizaf
leizaf / tokenizer.zig
Created August 30, 2024 06:20
Zig MLIR Lexer
const std = @import("std");
const cc = std.ascii.control_code;
const startsWith = std.mem.startsWith;
fn isDigitNotZero(c: u8) bool {
return switch (c) {
'1'...'9' => true,
else => false,
};
}