Skip to content

Commit

Permalink
fix: mark delimiter_vec_new static
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Jul 27, 2023
1 parent 7f176cd commit 1b67cc0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ typedef struct {
Delimiter *data;
} delimiter_vec;

delimiter_vec delimiter_vec_new() {
static delimiter_vec delimiter_vec_new() {
delimiter_vec vec = VEC_NEW;
vec.data = calloc(1, sizeof(Delimiter));
vec.cap = 1;
Expand Down Expand Up @@ -279,7 +279,8 @@ bool tree_sitter_python_external_scanner_scan(void *payload, TSLexer *lexer,
// If we haven't found an EOL yet,
// then this is a comment after an expression:
// foo = bar # comment
// Just return, since we don't want to generate an indent/dedent token.
// Just return, since we don't want to generate an indent/dedent
// token.
if (!found_end_of_line) {
return false;
}
Expand Down

0 comments on commit 1b67cc0

Please sign in to comment.