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

Function scan_string_start

codegraph-kernel/grammars/kotlin/scanner.c:64–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62// Scanner functions
63
64static bool scan_string_start(TSLexer *lexer, Stack *stack) {
65 if (lexer->lookahead != '"') return false;
66 advance(lexer);
67 lexer->mark_end(lexer);
68 for (unsigned count = 1; count < DELIMITER_LENGTH; ++count) {
69 if (lexer->lookahead != '"') {
70 // It's not a triple quoted delimiter.
71 stack_push(stack, '"', false);
72 return true;
73 }
74 advance(lexer);
75 }
76 lexer->mark_end(lexer);
77 stack_push(stack, '"', true);
78 return true;
79}
80
81static bool scan_string_content(TSLexer *lexer, Stack *stack) {
82 if (stack->size == 0) return false; // Stack is empty. We're not in a string.

Calls 2

stack_pushFunction · 0.85
advanceFunction · 0.70

Tested by

no test coverage detected