linters, some ast headers
This commit is contained in:
@@ -63,7 +63,7 @@ const keyword_map keywords[] = {
|
||||
};
|
||||
|
||||
// TODO binary search
|
||||
static tokenizer_tag get_keyword(const char* bytes, uint32_t len)
|
||||
static tokenizer_tag get_keyword(const char* bytes, const uint32_t len)
|
||||
{
|
||||
for (unsigned long i = 0; i < sizeof(keywords) / sizeof(keyword_map); i++) {
|
||||
size_t klen = strlen(keywords[i].keyword);
|
||||
@@ -78,12 +78,11 @@ static tokenizer_tag get_keyword(const char* bytes, uint32_t len)
|
||||
} else if (cmp < 0) {
|
||||
return TOKENIZER_TAG_INVALID;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
return TOKENIZER_TAG_INVALID;
|
||||
}
|
||||
|
||||
tokenizer tokenizer_init(const char* buffer, uint32_t len)
|
||||
tokenizer tokenizer_init(const char* buffer, const uint32_t len)
|
||||
{
|
||||
return (tokenizer) {
|
||||
.buffer = buffer,
|
||||
|
||||
Reference in New Issue
Block a user