Update language function name in README

This commit is contained in:
Max Brunsfeld 2017-01-31 11:41:46 -08:00
parent 005308f4c9
commit d73534e97d

View file

@ -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);