Files
wehub-resource-sync 41cb1c0170
OpenSSF Scorecard / scorecard (push) Failing after 0s
DCO / dco (push) Failing after 0s
CodeQL SAST / analyze (push) Failing after 1s
Deploy Pages / deploy (push) Failing after 1s
chore: import upstream snapshot with attribution
2026-07-13 12:28:05 +08:00

28 lines
845 B
PHP

static int32_t lowercase(int32_t lookahead)
{
if(lookahead >= 'A' && lookahead <= 'Z') lookahead += 'a' - 'A';
debug("lookahead = %c(0x%x)", (char)lookahead, lookahead);
return lookahead;
}
//------------------------------------------------------------------------------
static int32_t advance(TSLexer* lexer)
{
lexer->advance(lexer, false);
return lowercase(lexer->lookahead);
}
//------------------------------------------------------------------------------
const TokenType* token_tree_match(TSLexer* lexer)
{
uint32_t lookahead = lowercase(lexer->lookahead);
const TokenType* type = 0;
#include "token_tree_match.inc"
debug("type->head = %s", type ? token_type_to_string(type->type) : "UNKNOWN");
return type;
}
//------------------------------------------------------------------------------