Skip to content

Commit

Permalink
Add example of case enforcement to README
Browse files Browse the repository at this point in the history
  • Loading branch information
ctdunc committed Jan 17, 2025
1 parent 8eccef2 commit 9e91726
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,26 @@ The example below solves the problem of indenting function application in OCaml
)
```

### `@lower_case`/`@upper_case`
(Don't) Capitalize all of the text in the matched node.
Use this with care in languages that are case sensitive.

```scheme
; example for SQL, since that's where this makes sense.
; I am using the grammar linked below
; https://github.com/DerekStride/tree-sitter-sql/tree/main
; make keywords select,from lowercase.
(
[
(keyword_select)
(keyword_from)
] @lower_case
)
; make keyword WHERE uppercase
(keyword_where) @upper_case
```

### `#query_name!`

When the logging verbosity is set to `-vv` or higher, Topiary outputs information about which queries are matched, for instance:
Expand Down

0 comments on commit 9e91726

Please sign in to comment.