Skip to content

Commit

Permalink
render any character as @character, number as @numeric (not const…
Browse files Browse the repository at this point in the history
…ant) (#16)

* render any character as `@character`, number as `@number` (not constant)

* prepare to merge

* (highlight) fix the category of "𝕊" (not as one of `specialname_F`)

* (highlight) fix the category of "⇐" (not as one of `ASGN`)

* update document

* Update ChangeLog.md
  • Loading branch information
shnarazk authored May 31, 2023
1 parent d244f5d commit 47754e8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 9 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog and Loadmap

### Release 0.2.3

-(highlight) change some token categories
- '@' is `@character` (was `@constant.builtin`)
- `character` is `@character`(was `@constant.character`)
- `number` is `@numeric` (was `@constant.numeric`)
- `𝕊` in `HEAD` is `@function`
- `` in `EXPORT` is `@keyword.directive`

### Release 0.2.2

- (highlight) render modifiers as `@special`
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tree-sitter-bqn
Structual editing and highlighting [BQN](https://mlochbaum.github.io/BQN) programs with editors powered by [tree-sitter](https://tree-sitter.github.io/)

![](https://user-images.githubusercontent.com/997855/242119630-cf9cc32c-f7ea-4e56-9de1-6366d21074c6.png)
![](https://user-images.githubusercontent.com/997855/242257497-ec2578eb-45e2-46cd-9a52-cc761e1cdc11.png)

## Implementation memo

Expand Down
8 changes: 5 additions & 3 deletions queries/highlights.scm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
["·" "@"] @constant.builtin
["·"] @constant.builtin
["" "" "" "[" "]"] @operator
["(" ")" "{" "}"] @punctuation.bracket

Expand All @@ -8,12 +8,13 @@
";"
":"
""
""
(ASGN)
] @keyword.directive

(comment) @comment
(character) @constant.character
(number) @constant.numeric
["@" (character)] @character
(number) @numeric
(string) @string

[
Expand All @@ -24,6 +25,7 @@

[
(specialname_F)
"𝕊"
(symbol_Fl)
(symbol_F)
(system_F)
Expand Down

0 comments on commit 47754e8

Please sign in to comment.