Use gperf - not faster yet

This commit is contained in:
2025-08-17 06:22:55 -04:00
parent 6343213e1b
commit ce9d7db277
6 changed files with 193 additions and 56 deletions

12
src/json_tokens.hpp Normal file
View File

@@ -0,0 +1,12 @@
#pragma once
#include <cstring>
struct JsonToken {
const char *name;
int token_id;
};
class Perfect_Hash {
public:
static const struct JsonToken *lookup_json_token(const char *str, size_t len);
};