File tree Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 11#include "chars.h"
22
3- bool is_upper (int32_t c )
3+ static bool is_upper (int32_t c )
44{
55 const int32_t upper = 65 ;
66 const int32_t lower = 90 ;
77 return c >= upper && c <= lower ;
88}
99
10- bool is_digit (int32_t c )
10+ static bool is_digit (int32_t c )
1111{
1212 const int32_t upper = 48 ;
1313 const int32_t lower = 57 ;
1414 return c >= upper && c <= lower ;
1515}
1616
17- bool is_newline (int32_t c )
17+ static bool is_newline (int32_t c )
1818{
1919 const int32_t newline_chars [] = {
2020 CHAR_EOF ,
@@ -30,7 +30,7 @@ bool is_newline(int32_t c)
3030 return false;
3131}
3232
33- bool is_space (int32_t c )
33+ static bool is_space (int32_t c )
3434{
3535 const int32_t space_chars [] = {
3636 CHAR_SPACE ,
@@ -50,7 +50,7 @@ bool is_space(int32_t c)
5050}
5151
5252/// Check if the character is allowed inside the name.
53- bool is_internal_char (int32_t c )
53+ static bool is_internal_char (int32_t c )
5454{
5555 const int32_t valid_chars [] = {
5656 '-' ,
Original file line number Diff line number Diff line change 1313#define CHAR_TAB '\t'
1414#define CHAR_VERTICAL_TAB '\v'
1515
16- bool is_internal_char (int32_t c );
17- bool is_newline (int32_t c );
18- bool is_space (int32_t c );
19- bool is_upper (int32_t c );
20- bool is_digit (int32_t c );
16+ static bool is_internal_char (int32_t c );
17+ static bool is_newline (int32_t c );
18+ static bool is_space (int32_t c );
19+ static bool is_upper (int32_t c );
20+ static bool is_digit (int32_t c );
2121
2222#endif /* ifndef TREE_SITTER_COMMENT_CHARS_H */
Original file line number Diff line number Diff line change 1313/// - TODO(stsewd):
1414/// - TODO(stsewd): text
1515/// - TODO (stsewd): text
16- bool parse_tagname (TSLexer * lexer , const bool * valid_symbols )
16+ static bool parse_tagname (TSLexer * lexer , const bool * valid_symbols )
1717{
1818 if (!is_upper (lexer -> lookahead ) || !valid_symbols [T_TAGNAME ]) {
1919 return false;
@@ -81,7 +81,7 @@ bool parse_tagname(TSLexer* lexer, const bool* valid_symbols)
8181 return true;
8282}
8383
84- bool parse (TSLexer * lexer , const bool * valid_symbols )
84+ static bool parse (TSLexer * lexer , const bool * valid_symbols )
8585{
8686 // If all valid symbols are true, tree-sitter is in correction mode.
8787 // We don't want to parse anything in that case.
Original file line number Diff line number Diff line change 33
44#include <tree_sitter/parser.h>
55
6- bool parse_tagname (TSLexer * lexer , const bool * valid_symbols );
7- bool parse (TSLexer * lexer , const bool * valid_symbols );
6+ static bool parse_tagname (TSLexer * lexer , const bool * valid_symbols );
7+ static bool parse (TSLexer * lexer , const bool * valid_symbols );
88
99#endif /* ifndef TREE_SITTER_COMMENT_PARSER_H */
You can’t perform that action at this time.
0 commit comments