Skip to content

Commit

Permalink
Version 0.8.0 for Uiua 0.5.1 (#22)
Browse files Browse the repository at this point in the history
* modified:   ChangeLog.md
* modified:   flake.lock
* add `?`, remove removed glyphs by Uiua-0.5.0
* add a new category formatter for '\'' and '\'\''
* render `formatter` as `keyword.directive`
  • Loading branch information
shnarazk authored Dec 3, 2023
1 parent fdae3c8 commit c917a6c
Show file tree
Hide file tree
Showing 9 changed files with 40,551 additions and 40,104 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "tree-sitter-uiua"
description = "Uiua grammar for the tree-sitter parsing library"
version = "0.7.0"
version = "0.8.0"
keywords = ["incremental", "parsing", "Uiua"]
categories = ["parsing", "text-editors"]
repository = "https://github.com/tree-sitter/tree-sitter-uiua"
Expand Down
18 changes: 18 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

### 0.8.0: 2023-12-03

- follow Uiua-0.5.1
- add `stack`
- remove `reach`, `distribute`, `tribute`, `level`, `combinate`
- add `'` and `''`

### 0.7.0: 2023-12-03

- handle $-string known as multi-line string correctly

### 0.6.0: 2023-12-01

- follow Uiua-0.4.0
- add `rectify`, `this`, `recur`, and `fix`
- add `all`, `this`, `setinv`, and `setunder`
- deprecate ``

### 0.5.0: 2023-11-20

- follow Uiua-0.3.0
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module.exports = grammar({
$.identifier,
$.identifierDeprecated,
$.placeHolder,
$.formatter,
),
inlineFunction: $ => seq(
$.openParen,
Expand Down Expand Up @@ -109,6 +110,7 @@ module.exports = grammar({
underscore: $ => token('_'),
leftArrow: $ => token('←'),
placeHolder: $ => seq('^', /[0-9]+(\.[0-9]+)?/),
formatter: $ => choice(token('\''), token('\'\'')),
branchSeparator: $=> token('|'),
compound: $ => choice(
prec(1, seq(
Expand Down Expand Up @@ -375,6 +377,9 @@ module.exports = grammar({
token('☇'),
token('fix'),
token('¤'),

// Since 0.5.0
token('?'),
),
modifier1: $ => choice(
// (1[1], Reduce, AggregatingModifier, ("reduce", '/')),
Expand Down Expand Up @@ -470,12 +475,6 @@ module.exports = grammar({
token('⌂'),
token('↰'),

// Since 0.3.0
token('◳'),
token('≑'),
token('≐'),
token('∺'),

// Since 0.4.0
token('⟜'),
),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tree-sitter-uiua",
"version": "0.7.0",
"version": "0.8.0",
"description": "parser for Uiua",
"main": "bindings/node",
"scripts": {
Expand Down
5 changes: 4 additions & 1 deletion queries/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@
""
] @tag


[
(deprecated)
(identifierDeprecated)
] @warning

[
(formatter)
] @keyword.directive
58 changes: 30 additions & 28 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@
{
"type": "SYMBOL",
"name": "placeHolder"
},
{
"type": "SYMBOL",
"name": "formatter"
}
]
},
Expand Down Expand Up @@ -726,6 +730,25 @@
}
]
},
"formatter": {
"type": "CHOICE",
"members": [
{
"type": "TOKEN",
"content": {
"type": "STRING",
"value": "'"
}
},
{
"type": "TOKEN",
"content": {
"type": "STRING",
"value": "''"
}
}
]
},
"branchSeparator": {
"type": "TOKEN",
"content": {
Expand Down Expand Up @@ -1904,6 +1927,13 @@
"type": "STRING",
"value": "¤"
}
},
{
"type": "TOKEN",
"content": {
"type": "STRING",
"value": "?"
}
}
]
},
Expand Down Expand Up @@ -2340,34 +2370,6 @@
"value": ""
}
},
{
"type": "TOKEN",
"content": {
"type": "STRING",
"value": ""
}
},
{
"type": "TOKEN",
"content": {
"type": "STRING",
"value": ""
}
},
{
"type": "TOKEN",
"content": {
"type": "STRING",
"value": ""
}
},
{
"type": "TOKEN",
"content": {
"type": "STRING",
"value": ""
}
},
{
"type": "TOKEN",
"content": {
Expand Down
37 changes: 21 additions & 16 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@
"named": true,
"fields": {}
},
{
"type": "formatter",
"named": true,
"fields": {}
},
{
"type": "function",
"named": true,
Expand Down Expand Up @@ -362,6 +367,10 @@
"type": "compound",
"named": true
},
{
"type": "formatter",
"named": true
},
{
"type": "identifier",
"named": true
Expand Down Expand Up @@ -413,6 +422,14 @@
"type": "%",
"named": false
},
{
"type": "'",
"named": false
},
{
"type": "''",
"named": false
},
{
"type": "*",
"named": false
Expand Down Expand Up @@ -465,6 +482,10 @@
"type": ">=",
"named": false
},
{
"type": "?",
"named": false
},
{
"type": "Arch",
"named": false
Expand Down Expand Up @@ -1109,22 +1130,10 @@
"type": "",
"named": false
},
{
"type": "",
"named": false
},
{
"type": "",
"named": false
},
{
"type": "",
"named": false
},
{
"type": "",
"named": false
},
{
"type": "",
"named": false
Expand Down Expand Up @@ -1313,10 +1322,6 @@
"type": "",
"named": false
},
{
"type": "",
"named": false
},
{
"type": "",
"named": false
Expand Down
Loading

0 comments on commit c917a6c

Please sign in to comment.