refactor: remove extern/const where possible
This commit is contained in:
parent
59838de33a
commit
b4b2d9cecc
5 changed files with 26 additions and 13 deletions
|
|
@ -51,7 +51,7 @@ Here's an example of a simple C program that uses the Tree-sitter [JSON parser](
|
|||
|
||||
// Declare the `tree_sitter_json` function, which is
|
||||
// implemented by the `tree-sitter-json` library.
|
||||
extern const TSLanguage *tree_sitter_json();
|
||||
const TSLanguage *tree_sitter_json(void);
|
||||
|
||||
int main() {
|
||||
// Create a parser.
|
||||
|
|
@ -326,9 +326,9 @@ Conceptually, it can be represented by three syntax trees with overlapping range
|
|||
#include <tree_sitter/api.h>
|
||||
|
||||
// These functions are each implemented in their own repo.
|
||||
extern const TSLanguage *tree_sitter_embedded_template();
|
||||
extern const TSLanguage *tree_sitter_html();
|
||||
extern const TSLanguage *tree_sitter_ruby();
|
||||
const TSLanguage *tree_sitter_embedded_template(void);
|
||||
const TSLanguage *tree_sitter_html(void);
|
||||
const TSLanguage *tree_sitter_ruby(void);
|
||||
|
||||
int main(int argc, const char **argv) {
|
||||
const char *text = argv[1];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue