mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:36:22 -04:00
Update language function name in README
This commit is contained in:
parent
005308f4c9
commit
d73534e97d
|
|
@ -176,11 +176,11 @@ tokens, like `(` and `+`. This is useful when analyzing the meaning of a documen
|
|||
#include "tree_sitter/runtime.h"
|
||||
|
||||
// Declare the language function that was generated from your grammar.
|
||||
TSLanguage *ts_language_arithmetic();
|
||||
TSLanguage *tree_sitter_arithmetic();
|
||||
|
||||
int main() {
|
||||
TSDocument *document = ts_document_new();
|
||||
ts_document_set_language(document, ts_language_arithmetic());
|
||||
ts_document_set_language(document, tree_sitter_arithmetic());
|
||||
ts_document_set_input_string(document, "a + b * 5");
|
||||
ts_document_parse(document);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue