feat: allow external scanners to use the logger

Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
This commit is contained in:
Ron Panduwana 2024-08-18 01:46:28 +07:00 committed by GitHub
parent fec6c77da8
commit 2bb20fe2fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 40 additions and 0 deletions

View file

@ -77,6 +77,7 @@ bool tree_sitter_external_tokens_external_scanner_scan(
for (;;) {
if (scanner->depth == 0) {
lexer->log(lexer, "Found a percent string");
lexer->result_symbol = percent_string;
return true;
}