tree-sitter-beancount 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/cicd.yml +2 -2
- package/.github/workflows/release.yml +3 -3
- package/CHANGELOG.md +7 -0
- package/Cargo.toml +1 -1
- package/flake.lock +9 -9
- package/flake.nix +7 -8
- package/grammar.js +3 -3
- package/package.json +1 -1
- package/src/grammar.json +30 -18
- package/src/node-types.json +20 -8
- package/src/parser.c +2235 -2210
|
@@ -12,10 +12,10 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
steps:
|
|
14
14
|
- name: Checkout code
|
|
15
|
-
uses: actions/checkout@
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
16
|
|
|
17
17
|
- name: Setup Node
|
|
18
|
-
uses: actions/setup-node@v3.
|
|
18
|
+
uses: actions/setup-node@v3.8.1
|
|
19
19
|
with:
|
|
20
20
|
node-version: '18'
|
|
21
21
|
|
|
@@ -32,7 +32,7 @@ jobs:
|
|
|
32
32
|
profile: minimal
|
|
33
33
|
override: true
|
|
34
34
|
- name: Checking out sources
|
|
35
|
-
uses: actions/checkout@
|
|
35
|
+
uses: actions/checkout@v4
|
|
36
36
|
- name: Cache Cargo
|
|
37
37
|
uses: actions/cache@v3
|
|
38
38
|
with:
|
|
@@ -57,9 +57,9 @@ jobs:
|
|
|
57
57
|
if: needs.release-please.outputs.release_created
|
|
58
58
|
steps:
|
|
59
59
|
- name: Checking out sources
|
|
60
|
-
uses: actions/checkout@
|
|
60
|
+
uses: actions/checkout@v4
|
|
61
61
|
- name: Set up Node
|
|
62
|
-
uses: actions/setup-node@v3.
|
|
62
|
+
uses: actions/setup-node@v3.8.1
|
|
63
63
|
with:
|
|
64
64
|
node-version: '16'
|
|
65
65
|
registry-url: 'https://registry.npmjs.org'
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.2.0](https://github.com/polarmutex/tree-sitter-beancount/compare/v2.1.3...v2.2.0) (2023-10-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add named field for narration and payee ([0631b99](https://github.com/polarmutex/tree-sitter-beancount/commit/0631b99d9096e10f4e289efe618e518debe918b4))
|
|
9
|
+
|
|
3
10
|
## [2.1.3](https://github.com/polarmutex/tree-sitter-beancount/compare/v2.1.2...v2.1.3) (2023-07-02)
|
|
4
11
|
|
|
5
12
|
|
package/Cargo.toml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "tree-sitter-beancount"
|
|
3
3
|
description = "beancount grammar for the tree-sitter parsing library"
|
|
4
|
-
version = "2.
|
|
4
|
+
version = "2.2.0" # {x-release-please-version}
|
|
5
5
|
keywords = ["incremental", "parsing", "beancount", "tree-sitter"]
|
|
6
6
|
categories = ["parsing", "text-editors"]
|
|
7
7
|
repository = "https://github.com/polarmutex/tree-sitter-beancount"
|
package/flake.lock
CHANGED
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"systems": "systems"
|
|
22
22
|
},
|
|
23
23
|
"locked": {
|
|
24
|
-
"lastModified":
|
|
25
|
-
"narHash": "sha256-
|
|
24
|
+
"lastModified": 1694529238,
|
|
25
|
+
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
|
26
26
|
"owner": "numtide",
|
|
27
27
|
"repo": "flake-utils",
|
|
28
|
-
"rev": "
|
|
28
|
+
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
|
29
29
|
"type": "github"
|
|
30
30
|
},
|
|
31
31
|
"original": {
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
},
|
|
58
58
|
"nixpkgs": {
|
|
59
59
|
"locked": {
|
|
60
|
-
"lastModified":
|
|
61
|
-
"narHash": "sha256-
|
|
60
|
+
"lastModified": 1696604326,
|
|
61
|
+
"narHash": "sha256-YXUNI0kLEcI5g8lqGMb0nh67fY9f2YoJsILafh6zlMo=",
|
|
62
62
|
"owner": "NixOS",
|
|
63
63
|
"repo": "nixpkgs",
|
|
64
|
-
"rev": "
|
|
64
|
+
"rev": "87828a0e03d1418e848d3dd3f3014a632e4a4f64",
|
|
65
65
|
"type": "github"
|
|
66
66
|
},
|
|
67
67
|
"original": {
|
|
@@ -100,11 +100,11 @@
|
|
|
100
100
|
"nixpkgs-stable": "nixpkgs-stable"
|
|
101
101
|
},
|
|
102
102
|
"locked": {
|
|
103
|
-
"lastModified":
|
|
104
|
-
"narHash": "sha256-
|
|
103
|
+
"lastModified": 1696846637,
|
|
104
|
+
"narHash": "sha256-0hv4kbXxci2+pxhuXlVgftj/Jq79VSmtAyvfabCCtYk=",
|
|
105
105
|
"owner": "cachix",
|
|
106
106
|
"repo": "pre-commit-hooks.nix",
|
|
107
|
-
"rev": "
|
|
107
|
+
"rev": "42e1b6095ef80a51f79595d9951eb38e91c4e6ca",
|
|
108
108
|
"type": "github"
|
|
109
109
|
},
|
|
110
110
|
"original": {
|
package/flake.nix
CHANGED
|
@@ -82,13 +82,8 @@
|
|
|
82
82
|
nativeBuildInputs = with pkgs; [
|
|
83
83
|
nodejs
|
|
84
84
|
nodePackages.node-gyp
|
|
85
|
-
#
|
|
86
|
-
|
|
87
|
-
#rustc
|
|
88
|
-
#cargo
|
|
89
|
-
#rustfmt
|
|
90
|
-
#clippy
|
|
91
|
-
(tree-sitter.overrideAttrs (_: {webUISupport = true;}))
|
|
85
|
+
# broken (tree-sitter.override {webUISupport = true;})
|
|
86
|
+
tree-sitter
|
|
92
87
|
];
|
|
93
88
|
|
|
94
89
|
inherit (checks.pre-commit) shellHook;
|
|
@@ -98,7 +93,11 @@
|
|
|
98
93
|
packages = {
|
|
99
94
|
default = packages.tree-sitter-beancount;
|
|
100
95
|
|
|
101
|
-
|
|
96
|
+
tree-sitter-beancount = pkgs.callPackage (nixpkgs + "/pkgs/development/tools/parsing/tree-sitter/grammar.nix") {} {
|
|
97
|
+
language = "beancount";
|
|
98
|
+
src = ./.;
|
|
99
|
+
inherit (pkgs.tree-sitter) version;
|
|
100
|
+
};
|
|
102
101
|
|
|
103
102
|
inherit (pkgs) tree-sitter;
|
|
104
103
|
};
|
package/grammar.js
CHANGED
|
@@ -169,10 +169,10 @@ module.exports = grammar({
|
|
|
169
169
|
_txn_strings: $ =>
|
|
170
170
|
choice(
|
|
171
171
|
seq(
|
|
172
|
-
alias($.string, $.payee),
|
|
173
|
-
alias($.string, $.narration),
|
|
172
|
+
field("payee", alias($.string, $.payee)),
|
|
173
|
+
field("narration", alias($.string, $.narration)),
|
|
174
174
|
),
|
|
175
|
-
alias($.string, $.narration),
|
|
175
|
+
field("narration", alias($.string, $.narration)),
|
|
176
176
|
),
|
|
177
177
|
|
|
178
178
|
// OPTIONAL
|
package/package.json
CHANGED
package/src/grammar.json
CHANGED
|
@@ -474,33 +474,45 @@
|
|
|
474
474
|
"type": "SEQ",
|
|
475
475
|
"members": [
|
|
476
476
|
{
|
|
477
|
-
"type": "
|
|
477
|
+
"type": "FIELD",
|
|
478
|
+
"name": "payee",
|
|
478
479
|
"content": {
|
|
479
|
-
"type": "
|
|
480
|
-
"
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
480
|
+
"type": "ALIAS",
|
|
481
|
+
"content": {
|
|
482
|
+
"type": "SYMBOL",
|
|
483
|
+
"name": "string"
|
|
484
|
+
},
|
|
485
|
+
"named": true,
|
|
486
|
+
"value": "payee"
|
|
487
|
+
}
|
|
484
488
|
},
|
|
485
489
|
{
|
|
486
|
-
"type": "
|
|
490
|
+
"type": "FIELD",
|
|
491
|
+
"name": "narration",
|
|
487
492
|
"content": {
|
|
488
|
-
"type": "
|
|
489
|
-
"
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
+
"type": "ALIAS",
|
|
494
|
+
"content": {
|
|
495
|
+
"type": "SYMBOL",
|
|
496
|
+
"name": "string"
|
|
497
|
+
},
|
|
498
|
+
"named": true,
|
|
499
|
+
"value": "narration"
|
|
500
|
+
}
|
|
493
501
|
}
|
|
494
502
|
]
|
|
495
503
|
},
|
|
496
504
|
{
|
|
497
|
-
"type": "
|
|
505
|
+
"type": "FIELD",
|
|
506
|
+
"name": "narration",
|
|
498
507
|
"content": {
|
|
499
|
-
"type": "
|
|
500
|
-
"
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
508
|
+
"type": "ALIAS",
|
|
509
|
+
"content": {
|
|
510
|
+
"type": "SYMBOL",
|
|
511
|
+
"name": "string"
|
|
512
|
+
},
|
|
513
|
+
"named": true,
|
|
514
|
+
"value": "narration"
|
|
515
|
+
}
|
|
504
516
|
}
|
|
505
517
|
]
|
|
506
518
|
},
|
package/src/node-types.json
CHANGED
|
@@ -1349,6 +1349,26 @@
|
|
|
1349
1349
|
}
|
|
1350
1350
|
]
|
|
1351
1351
|
},
|
|
1352
|
+
"narration": {
|
|
1353
|
+
"multiple": false,
|
|
1354
|
+
"required": false,
|
|
1355
|
+
"types": [
|
|
1356
|
+
{
|
|
1357
|
+
"type": "narration",
|
|
1358
|
+
"named": true
|
|
1359
|
+
}
|
|
1360
|
+
]
|
|
1361
|
+
},
|
|
1362
|
+
"payee": {
|
|
1363
|
+
"multiple": false,
|
|
1364
|
+
"required": false,
|
|
1365
|
+
"types": [
|
|
1366
|
+
{
|
|
1367
|
+
"type": "payee",
|
|
1368
|
+
"named": true
|
|
1369
|
+
}
|
|
1370
|
+
]
|
|
1371
|
+
},
|
|
1352
1372
|
"tags_links": {
|
|
1353
1373
|
"multiple": false,
|
|
1354
1374
|
"required": false,
|
|
@@ -1382,14 +1402,6 @@
|
|
|
1382
1402
|
"type": "key_value",
|
|
1383
1403
|
"named": true
|
|
1384
1404
|
},
|
|
1385
|
-
{
|
|
1386
|
-
"type": "narration",
|
|
1387
|
-
"named": true
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
"type": "payee",
|
|
1391
|
-
"named": true
|
|
1392
|
-
},
|
|
1393
1405
|
{
|
|
1394
1406
|
"type": "posting",
|
|
1395
1407
|
"named": true
|