From b65582797ac1d42576a0193b004a5fa5b147eae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ronan=20Cherrueau=20=E2=9A=93?= Date: Fri, 3 Apr 2020 20:35:31 +0200 Subject: [PATCH] Fix the Getting Started example in docs (#588) Running the first example of the Getting Started failed with: main: Assertion `strcmp(ts_node_type(root_node), "value") == 0' failed. The cause is the json parser that renamed the entry rule from `value` to `document` in commit tree-sitter/tree-sitter-json@1e4abcc. This commit update the example in docs to fix the assert. --- docs/section-2-using-parsers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/section-2-using-parsers.md b/docs/section-2-using-parsers.md index 15cadff6..406e8364 100644 --- a/docs/section-2-using-parsers.md +++ b/docs/section-2-using-parsers.md @@ -78,7 +78,7 @@ int main() { TSNode number_node = ts_node_named_child(array_node, 0); // Check that the nodes have the expected types. - assert(strcmp(ts_node_type(root_node), "value") == 0); + assert(strcmp(ts_node_type(root_node), "document") == 0); assert(strcmp(ts_node_type(array_node), "array") == 0); assert(strcmp(ts_node_type(number_node), "number") == 0);