From 4c602173456536a7b2223dab815bac90180f525a Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Thu, 17 Feb 2022 17:43:14 -0500 Subject: [PATCH] Flesh out output. --- docs/section-8-code-navigation-systems.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/section-8-code-navigation-systems.md b/docs/section-8-code-navigation-systems.md index 7a259455..e60d345f 100644 --- a/docs/section-8-code-navigation-systems.md +++ b/docs/section-8-code-navigation-systems.md @@ -77,24 +77,25 @@ The below table describes a standard vocabulary for kinds and roles during the t ## Command-line invocation -You can use the `tree-sitter tags` command to test out a tags query file. We can run this tool from within the Tree-sitter Ruby repository, over code in a file called `test.rb` +You can use the `tree-sitter tags` command to test out a tags query file, passing as arguments one or more files to tag. We can run this tool from within the Tree-sitter Ruby repository, over code in a file called `test.rb`: ``` ruby module Foo class Bar + # wow! def baz end end end ``` -Invoking `tree-sitter tags test.rb` produces the following console output: +Invoking `tree-sitter tags test.rb` produces the following console output, representing matched entities' name, role, location, first line, and docstring: ``` test.rb - Foo | module def (0, 7) - (0, 10) `module Foo` + Foo | module def (0, 7) - (0, 10) `module Foo` Bar | class def (1, 8) - (1, 11) `class Bar` - baz | method def (2, 8) - (2, 11) `def baz` + baz | method def (2, 8) - (2, 11) `def baz` "wow!" ``` -By convention, tags for a given language are made available in a `queries/tags.scm`file in that language's repository. +It is expected that tag queries for a given language are located at `queries/tags.scm` in that language's repository.