MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / scan_word

Function scan_word

codegraph-kernel/grammars/scala/scanner.c:436–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436static bool scan_word(TSLexer *lexer, const char* const word) {
437 for (uint8_t i = 0; word[i] != '\0'; i++) {
438 if (lexer->lookahead != word[i]) {
439 return false;
440 }
441 advance(lexer);
442 }
443 // `match_` must not match the keyword `match`.
444 return !(is_alnum(lexer->lookahead) || lexer->lookahead == '_' ||
445 lexer->lookahead == '$');
446}
447
448// Reads one identifier-like word into `buf`. Returns -1 when the word
449// cannot be an ASCII keyword. The whole word is always consumed, so a

Callers 2

is_case_clause_introFunction · 0.85
scan_implFunction · 0.85

Calls 2

is_alnumFunction · 0.85
advanceFunction · 0.70

Tested by

no test coverage detected