@konomanoasa/tree-sitter-toml 0.1.0 → 0.3.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/Cargo.toml +23 -0
- package/README.md +11 -2
- package/bindings/rust/build.rs +23 -0
- package/bindings/rust/lib.rs +12 -0
- package/grammar.js +29 -7
- package/package.json +6 -2
- package/src/grammar.json +351 -64
- package/src/node-types.json +5 -4
- package/src/parser.c +5532 -4141
- package/src/scanner.c +1 -1
- package/test/bindings.test.rs +29 -0
- package/tree-sitter.json +2 -2
package/Cargo.toml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "tree-sitter-toml"
|
|
3
|
+
version = "0.3.0"
|
|
4
|
+
edition = "2024"
|
|
5
|
+
build = "bindings/rust/build.rs"
|
|
6
|
+
links = "tree-sitter-toml"
|
|
7
|
+
publish = false
|
|
8
|
+
|
|
9
|
+
[lib]
|
|
10
|
+
path = "bindings/rust/lib.rs"
|
|
11
|
+
|
|
12
|
+
[[test]]
|
|
13
|
+
name = "bindings"
|
|
14
|
+
path = "test/bindings.test.rs"
|
|
15
|
+
|
|
16
|
+
[dependencies]
|
|
17
|
+
tree-sitter-language = "0.1.8"
|
|
18
|
+
|
|
19
|
+
[dev-dependencies]
|
|
20
|
+
tree-sitter = "0.27.0"
|
|
21
|
+
|
|
22
|
+
[build-dependencies]
|
|
23
|
+
cc = "1.4"
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/@konomanoasa/tree-sitter-toml)
|
|
5
5
|
|
|
6
6
|
[Tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for
|
|
7
|
-
|
|
7
|
+
Tom's Obvious Minimal Language 1.1.0.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -12,11 +12,20 @@ TOML 1.1.0.
|
|
|
12
12
|
npm install @konomanoasa/tree-sitter-toml
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
## Grammar
|
|
16
|
+
|
|
17
|
+
| Grammar | Description | Rust constant |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `toml` | TOML 1.1.0 | `LANGUAGE` |
|
|
20
|
+
|
|
15
21
|
## Development
|
|
16
22
|
|
|
23
|
+
Development requires Node.js 24.2.0 or later.
|
|
24
|
+
|
|
17
25
|
```sh
|
|
18
26
|
npm install
|
|
19
|
-
npm run
|
|
27
|
+
npm run build
|
|
28
|
+
npm test
|
|
20
29
|
```
|
|
21
30
|
|
|
22
31
|
## Specifications
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
use std::{env, path::Path};
|
|
2
|
+
|
|
3
|
+
fn main() {
|
|
4
|
+
let mut build = cc::Build::new();
|
|
5
|
+
build.std("c17");
|
|
6
|
+
if build.get_compiler().is_like_msvc() {
|
|
7
|
+
build.flag("-utf-8");
|
|
8
|
+
}
|
|
9
|
+
if env::var("TARGET").expect("Cargo must provide TARGET")
|
|
10
|
+
== "wasm32-unknown-unknown"
|
|
11
|
+
{
|
|
12
|
+
let headers = env::var_os("DEP_TREE_SITTER_LANGUAGE_WASM_HEADERS")
|
|
13
|
+
.expect("tree-sitter-language must provide WebAssembly headers");
|
|
14
|
+
build.include(&headers);
|
|
15
|
+
println!("cargo::rerun-if-changed={}", Path::new(&headers).display());
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
println!("cargo::rerun-if-changed=src");
|
|
19
|
+
build
|
|
20
|
+
.include("src")
|
|
21
|
+
.files(["src/parser.c", "src/scanner.c"])
|
|
22
|
+
.compile("tree-sitter-toml");
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
use tree_sitter_language::LanguageFn;
|
|
2
|
+
|
|
3
|
+
unsafe extern "C" {
|
|
4
|
+
fn tree_sitter_toml() -> *const ();
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
pub const LANGUAGE: LanguageFn =
|
|
8
|
+
unsafe { LanguageFn::from_raw(tree_sitter_toml) };
|
|
9
|
+
|
|
10
|
+
pub const NODE_TYPES: &str = include_str!("../../src/node-types.json");
|
|
11
|
+
|
|
12
|
+
pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm");
|
package/grammar.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
const sign = optional(choice("-", "+"));
|
|
2
2
|
|
|
3
|
-
const digit = (
|
|
3
|
+
const digit = ($, rule = $._digit) => alias(rule, $.digit);
|
|
4
|
+
|
|
5
|
+
const digits = (characters) =>
|
|
6
|
+
choice(...Array.from(characters, (character) => new RegExp(character)));
|
|
4
7
|
|
|
5
8
|
const hexdig = ($) => alias($._hexdig, $.hexdig);
|
|
6
9
|
|
|
@@ -37,6 +40,8 @@ export default grammar({
|
|
|
37
40
|
[$.key, $.dotted_key],
|
|
38
41
|
[$.dotted_key],
|
|
39
42
|
[$.unsigned_dec_int, $._digit],
|
|
43
|
+
[$._digit, $.time_hour],
|
|
44
|
+
[$._digit1_9, $.time_hour],
|
|
40
45
|
[$.offset_date_time, $.local_date_time, $.local_date],
|
|
41
46
|
[$.array_values],
|
|
42
47
|
[$.inline_table_keyvals],
|
|
@@ -141,7 +146,7 @@ export default grammar({
|
|
|
141
146
|
oct_int: ($) => seq("0o", separated(alias($._digit0_7, $.digit0_7))),
|
|
142
147
|
bin_int: ($) => seq("0b", separated(alias($._digit0_1, $.digit0_1))),
|
|
143
148
|
_digit: ($) => choice(/0/, $._digit1_9),
|
|
144
|
-
_digit1_9: () =>
|
|
149
|
+
_digit1_9: () => digits("123456789"),
|
|
145
150
|
_digit0_7: () => /[0-7]/,
|
|
146
151
|
_digit0_1: () => /[01]/,
|
|
147
152
|
_hexdig: ($) => choice($._digit, /[A-Fa-f]/),
|
|
@@ -160,12 +165,29 @@ export default grammar({
|
|
|
160
165
|
date_time: ($) =>
|
|
161
166
|
choice($.offset_date_time, $.local_date_time, $.local_date, $.local_time),
|
|
162
167
|
date_fullyear: ($) => seq(...times(4, digit($))),
|
|
163
|
-
date_month: ($) =>
|
|
164
|
-
|
|
168
|
+
date_month: ($) =>
|
|
169
|
+
choice(
|
|
170
|
+
seq(digit($, /0/), digit($, $._digit1_9)),
|
|
171
|
+
seq(digit($, /1/), digit($, digits("012"))),
|
|
172
|
+
),
|
|
173
|
+
date_mday: ($) =>
|
|
174
|
+
choice(
|
|
175
|
+
seq(digit($, /0/), digit($, $._digit1_9)),
|
|
176
|
+
seq(digit($, digits("12")), digit($)),
|
|
177
|
+
seq(digit($, /3/), digit($, digits("01"))),
|
|
178
|
+
),
|
|
165
179
|
time_delim: ($) => choice("T", "t", alias($._space, " ")),
|
|
166
|
-
time_hour: ($) =>
|
|
167
|
-
|
|
168
|
-
|
|
180
|
+
time_hour: ($) =>
|
|
181
|
+
choice(
|
|
182
|
+
seq(digit($, digits("01")), digit($)),
|
|
183
|
+
seq(digit($, /2/), digit($, digits("0123"))),
|
|
184
|
+
),
|
|
185
|
+
time_minute: ($) => seq(digit($, digits("012345")), digit($)),
|
|
186
|
+
time_second: ($) =>
|
|
187
|
+
choice(
|
|
188
|
+
seq(digit($, digits("012345")), digit($)),
|
|
189
|
+
seq(digit($, /6/), digit($, /0/)),
|
|
190
|
+
),
|
|
169
191
|
time_secfrac: ($) => seq(".", repeat1(digit($))),
|
|
170
192
|
time_numoffset: ($) =>
|
|
171
193
|
seq(choice("+", "-"), $.time_hour, ":", $.time_minute),
|
package/package.json
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konomanoasa/tree-sitter-toml",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Tree-sitter grammar for TOML.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "git+https://github.com/konomanoasa/tree-sitter-toml.git",
|
|
8
8
|
"files": [
|
|
9
|
+
"Cargo.toml",
|
|
10
|
+
"bindings/rust/*.rs",
|
|
9
11
|
"grammar.js",
|
|
10
12
|
"queries/*.scm",
|
|
11
13
|
"src/*.c",
|
|
12
14
|
"src/*.json",
|
|
13
15
|
"src/tree_sitter/*.h",
|
|
16
|
+
"test/bindings.test.rs",
|
|
14
17
|
"tree-sitter.json"
|
|
15
18
|
],
|
|
16
19
|
"publishConfig": {
|
|
17
20
|
"access": "public"
|
|
18
21
|
},
|
|
19
22
|
"scripts": {
|
|
23
|
+
"build": "npm run tree-sitter -- build-all",
|
|
20
24
|
"check": "biome check . && node scripts/check-c.js && node scripts/check-generated.js && npm test",
|
|
21
25
|
"format": "biome check --write . && node scripts/check-c.js --write",
|
|
22
26
|
"generate": "npm run tree-sitter -- generate-all",
|
|
23
|
-
"parse": "npm run tree-sitter -- parse --scope source.toml",
|
|
24
27
|
"test": "npm run tree-sitter -- test-corpus --rebuild && node --test --test-concurrency=1 \"test/*.test.js\"",
|
|
28
|
+
"test:bindings": "cargo test --locked",
|
|
25
29
|
"test:fuzz": "node --test --test-name-pattern=\"fixed-seed generated histories\" test/incremental.test.js",
|
|
26
30
|
"test:fuzz:corpus": "npm run tree-sitter -- fuzz-all --iterations 100 --edits 5",
|
|
27
31
|
"test:highlights": "node --test test/highlight.test.js",
|
package/src/grammar.json
CHANGED
|
@@ -1182,8 +1182,45 @@
|
|
|
1182
1182
|
]
|
|
1183
1183
|
},
|
|
1184
1184
|
"_digit1_9": {
|
|
1185
|
-
"type": "
|
|
1186
|
-
"
|
|
1185
|
+
"type": "CHOICE",
|
|
1186
|
+
"members": [
|
|
1187
|
+
{
|
|
1188
|
+
"type": "PATTERN",
|
|
1189
|
+
"value": "1"
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"type": "PATTERN",
|
|
1193
|
+
"value": "2"
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
"type": "PATTERN",
|
|
1197
|
+
"value": "3"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
"type": "PATTERN",
|
|
1201
|
+
"value": "4"
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"type": "PATTERN",
|
|
1205
|
+
"value": "5"
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
"type": "PATTERN",
|
|
1209
|
+
"value": "6"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"type": "PATTERN",
|
|
1213
|
+
"value": "7"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
"type": "PATTERN",
|
|
1217
|
+
"value": "8"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"type": "PATTERN",
|
|
1221
|
+
"value": "9"
|
|
1222
|
+
}
|
|
1223
|
+
]
|
|
1187
1224
|
},
|
|
1188
1225
|
"_digit0_7": {
|
|
1189
1226
|
"type": "PATTERN",
|
|
@@ -1487,48 +1524,158 @@
|
|
|
1487
1524
|
]
|
|
1488
1525
|
},
|
|
1489
1526
|
"date_month": {
|
|
1490
|
-
"type": "
|
|
1527
|
+
"type": "CHOICE",
|
|
1491
1528
|
"members": [
|
|
1492
1529
|
{
|
|
1493
|
-
"type": "
|
|
1494
|
-
"
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1530
|
+
"type": "SEQ",
|
|
1531
|
+
"members": [
|
|
1532
|
+
{
|
|
1533
|
+
"type": "ALIAS",
|
|
1534
|
+
"content": {
|
|
1535
|
+
"type": "PATTERN",
|
|
1536
|
+
"value": "0"
|
|
1537
|
+
},
|
|
1538
|
+
"named": true,
|
|
1539
|
+
"value": "digit"
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
"type": "ALIAS",
|
|
1543
|
+
"content": {
|
|
1544
|
+
"type": "SYMBOL",
|
|
1545
|
+
"name": "_digit1_9"
|
|
1546
|
+
},
|
|
1547
|
+
"named": true,
|
|
1548
|
+
"value": "digit"
|
|
1549
|
+
}
|
|
1550
|
+
]
|
|
1500
1551
|
},
|
|
1501
1552
|
{
|
|
1502
|
-
"type": "
|
|
1503
|
-
"
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1553
|
+
"type": "SEQ",
|
|
1554
|
+
"members": [
|
|
1555
|
+
{
|
|
1556
|
+
"type": "ALIAS",
|
|
1557
|
+
"content": {
|
|
1558
|
+
"type": "PATTERN",
|
|
1559
|
+
"value": "1"
|
|
1560
|
+
},
|
|
1561
|
+
"named": true,
|
|
1562
|
+
"value": "digit"
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
"type": "ALIAS",
|
|
1566
|
+
"content": {
|
|
1567
|
+
"type": "CHOICE",
|
|
1568
|
+
"members": [
|
|
1569
|
+
{
|
|
1570
|
+
"type": "PATTERN",
|
|
1571
|
+
"value": "0"
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
"type": "PATTERN",
|
|
1575
|
+
"value": "1"
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
"type": "PATTERN",
|
|
1579
|
+
"value": "2"
|
|
1580
|
+
}
|
|
1581
|
+
]
|
|
1582
|
+
},
|
|
1583
|
+
"named": true,
|
|
1584
|
+
"value": "digit"
|
|
1585
|
+
}
|
|
1586
|
+
]
|
|
1509
1587
|
}
|
|
1510
1588
|
]
|
|
1511
1589
|
},
|
|
1512
1590
|
"date_mday": {
|
|
1513
|
-
"type": "
|
|
1591
|
+
"type": "CHOICE",
|
|
1514
1592
|
"members": [
|
|
1515
1593
|
{
|
|
1516
|
-
"type": "
|
|
1517
|
-
"
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1594
|
+
"type": "SEQ",
|
|
1595
|
+
"members": [
|
|
1596
|
+
{
|
|
1597
|
+
"type": "ALIAS",
|
|
1598
|
+
"content": {
|
|
1599
|
+
"type": "PATTERN",
|
|
1600
|
+
"value": "0"
|
|
1601
|
+
},
|
|
1602
|
+
"named": true,
|
|
1603
|
+
"value": "digit"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
"type": "ALIAS",
|
|
1607
|
+
"content": {
|
|
1608
|
+
"type": "SYMBOL",
|
|
1609
|
+
"name": "_digit1_9"
|
|
1610
|
+
},
|
|
1611
|
+
"named": true,
|
|
1612
|
+
"value": "digit"
|
|
1613
|
+
}
|
|
1614
|
+
]
|
|
1523
1615
|
},
|
|
1524
1616
|
{
|
|
1525
|
-
"type": "
|
|
1526
|
-
"
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1617
|
+
"type": "SEQ",
|
|
1618
|
+
"members": [
|
|
1619
|
+
{
|
|
1620
|
+
"type": "ALIAS",
|
|
1621
|
+
"content": {
|
|
1622
|
+
"type": "CHOICE",
|
|
1623
|
+
"members": [
|
|
1624
|
+
{
|
|
1625
|
+
"type": "PATTERN",
|
|
1626
|
+
"value": "1"
|
|
1627
|
+
},
|
|
1628
|
+
{
|
|
1629
|
+
"type": "PATTERN",
|
|
1630
|
+
"value": "2"
|
|
1631
|
+
}
|
|
1632
|
+
]
|
|
1633
|
+
},
|
|
1634
|
+
"named": true,
|
|
1635
|
+
"value": "digit"
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
"type": "ALIAS",
|
|
1639
|
+
"content": {
|
|
1640
|
+
"type": "SYMBOL",
|
|
1641
|
+
"name": "_digit"
|
|
1642
|
+
},
|
|
1643
|
+
"named": true,
|
|
1644
|
+
"value": "digit"
|
|
1645
|
+
}
|
|
1646
|
+
]
|
|
1647
|
+
},
|
|
1648
|
+
{
|
|
1649
|
+
"type": "SEQ",
|
|
1650
|
+
"members": [
|
|
1651
|
+
{
|
|
1652
|
+
"type": "ALIAS",
|
|
1653
|
+
"content": {
|
|
1654
|
+
"type": "PATTERN",
|
|
1655
|
+
"value": "3"
|
|
1656
|
+
},
|
|
1657
|
+
"named": true,
|
|
1658
|
+
"value": "digit"
|
|
1659
|
+
},
|
|
1660
|
+
{
|
|
1661
|
+
"type": "ALIAS",
|
|
1662
|
+
"content": {
|
|
1663
|
+
"type": "CHOICE",
|
|
1664
|
+
"members": [
|
|
1665
|
+
{
|
|
1666
|
+
"type": "PATTERN",
|
|
1667
|
+
"value": "0"
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
"type": "PATTERN",
|
|
1671
|
+
"value": "1"
|
|
1672
|
+
}
|
|
1673
|
+
]
|
|
1674
|
+
},
|
|
1675
|
+
"named": true,
|
|
1676
|
+
"value": "digit"
|
|
1677
|
+
}
|
|
1678
|
+
]
|
|
1532
1679
|
}
|
|
1533
1680
|
]
|
|
1534
1681
|
},
|
|
@@ -1555,25 +1702,79 @@
|
|
|
1555
1702
|
]
|
|
1556
1703
|
},
|
|
1557
1704
|
"time_hour": {
|
|
1558
|
-
"type": "
|
|
1705
|
+
"type": "CHOICE",
|
|
1559
1706
|
"members": [
|
|
1560
1707
|
{
|
|
1561
|
-
"type": "
|
|
1562
|
-
"
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1708
|
+
"type": "SEQ",
|
|
1709
|
+
"members": [
|
|
1710
|
+
{
|
|
1711
|
+
"type": "ALIAS",
|
|
1712
|
+
"content": {
|
|
1713
|
+
"type": "CHOICE",
|
|
1714
|
+
"members": [
|
|
1715
|
+
{
|
|
1716
|
+
"type": "PATTERN",
|
|
1717
|
+
"value": "0"
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"type": "PATTERN",
|
|
1721
|
+
"value": "1"
|
|
1722
|
+
}
|
|
1723
|
+
]
|
|
1724
|
+
},
|
|
1725
|
+
"named": true,
|
|
1726
|
+
"value": "digit"
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
"type": "ALIAS",
|
|
1730
|
+
"content": {
|
|
1731
|
+
"type": "SYMBOL",
|
|
1732
|
+
"name": "_digit"
|
|
1733
|
+
},
|
|
1734
|
+
"named": true,
|
|
1735
|
+
"value": "digit"
|
|
1736
|
+
}
|
|
1737
|
+
]
|
|
1568
1738
|
},
|
|
1569
1739
|
{
|
|
1570
|
-
"type": "
|
|
1571
|
-
"
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1740
|
+
"type": "SEQ",
|
|
1741
|
+
"members": [
|
|
1742
|
+
{
|
|
1743
|
+
"type": "ALIAS",
|
|
1744
|
+
"content": {
|
|
1745
|
+
"type": "PATTERN",
|
|
1746
|
+
"value": "2"
|
|
1747
|
+
},
|
|
1748
|
+
"named": true,
|
|
1749
|
+
"value": "digit"
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
"type": "ALIAS",
|
|
1753
|
+
"content": {
|
|
1754
|
+
"type": "CHOICE",
|
|
1755
|
+
"members": [
|
|
1756
|
+
{
|
|
1757
|
+
"type": "PATTERN",
|
|
1758
|
+
"value": "0"
|
|
1759
|
+
},
|
|
1760
|
+
{
|
|
1761
|
+
"type": "PATTERN",
|
|
1762
|
+
"value": "1"
|
|
1763
|
+
},
|
|
1764
|
+
{
|
|
1765
|
+
"type": "PATTERN",
|
|
1766
|
+
"value": "2"
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
"type": "PATTERN",
|
|
1770
|
+
"value": "3"
|
|
1771
|
+
}
|
|
1772
|
+
]
|
|
1773
|
+
},
|
|
1774
|
+
"named": true,
|
|
1775
|
+
"value": "digit"
|
|
1776
|
+
}
|
|
1777
|
+
]
|
|
1577
1778
|
}
|
|
1578
1779
|
]
|
|
1579
1780
|
},
|
|
@@ -1583,8 +1784,33 @@
|
|
|
1583
1784
|
{
|
|
1584
1785
|
"type": "ALIAS",
|
|
1585
1786
|
"content": {
|
|
1586
|
-
"type": "
|
|
1587
|
-
"
|
|
1787
|
+
"type": "CHOICE",
|
|
1788
|
+
"members": [
|
|
1789
|
+
{
|
|
1790
|
+
"type": "PATTERN",
|
|
1791
|
+
"value": "0"
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
"type": "PATTERN",
|
|
1795
|
+
"value": "1"
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
"type": "PATTERN",
|
|
1799
|
+
"value": "2"
|
|
1800
|
+
},
|
|
1801
|
+
{
|
|
1802
|
+
"type": "PATTERN",
|
|
1803
|
+
"value": "3"
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
"type": "PATTERN",
|
|
1807
|
+
"value": "4"
|
|
1808
|
+
},
|
|
1809
|
+
{
|
|
1810
|
+
"type": "PATTERN",
|
|
1811
|
+
"value": "5"
|
|
1812
|
+
}
|
|
1813
|
+
]
|
|
1588
1814
|
},
|
|
1589
1815
|
"named": true,
|
|
1590
1816
|
"value": "digit"
|
|
@@ -1601,25 +1827,78 @@
|
|
|
1601
1827
|
]
|
|
1602
1828
|
},
|
|
1603
1829
|
"time_second": {
|
|
1604
|
-
"type": "
|
|
1830
|
+
"type": "CHOICE",
|
|
1605
1831
|
"members": [
|
|
1606
1832
|
{
|
|
1607
|
-
"type": "
|
|
1608
|
-
"
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1833
|
+
"type": "SEQ",
|
|
1834
|
+
"members": [
|
|
1835
|
+
{
|
|
1836
|
+
"type": "ALIAS",
|
|
1837
|
+
"content": {
|
|
1838
|
+
"type": "CHOICE",
|
|
1839
|
+
"members": [
|
|
1840
|
+
{
|
|
1841
|
+
"type": "PATTERN",
|
|
1842
|
+
"value": "0"
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
"type": "PATTERN",
|
|
1846
|
+
"value": "1"
|
|
1847
|
+
},
|
|
1848
|
+
{
|
|
1849
|
+
"type": "PATTERN",
|
|
1850
|
+
"value": "2"
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
"type": "PATTERN",
|
|
1854
|
+
"value": "3"
|
|
1855
|
+
},
|
|
1856
|
+
{
|
|
1857
|
+
"type": "PATTERN",
|
|
1858
|
+
"value": "4"
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
"type": "PATTERN",
|
|
1862
|
+
"value": "5"
|
|
1863
|
+
}
|
|
1864
|
+
]
|
|
1865
|
+
},
|
|
1866
|
+
"named": true,
|
|
1867
|
+
"value": "digit"
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
"type": "ALIAS",
|
|
1871
|
+
"content": {
|
|
1872
|
+
"type": "SYMBOL",
|
|
1873
|
+
"name": "_digit"
|
|
1874
|
+
},
|
|
1875
|
+
"named": true,
|
|
1876
|
+
"value": "digit"
|
|
1877
|
+
}
|
|
1878
|
+
]
|
|
1614
1879
|
},
|
|
1615
1880
|
{
|
|
1616
|
-
"type": "
|
|
1617
|
-
"
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1881
|
+
"type": "SEQ",
|
|
1882
|
+
"members": [
|
|
1883
|
+
{
|
|
1884
|
+
"type": "ALIAS",
|
|
1885
|
+
"content": {
|
|
1886
|
+
"type": "PATTERN",
|
|
1887
|
+
"value": "6"
|
|
1888
|
+
},
|
|
1889
|
+
"named": true,
|
|
1890
|
+
"value": "digit"
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
"type": "ALIAS",
|
|
1894
|
+
"content": {
|
|
1895
|
+
"type": "PATTERN",
|
|
1896
|
+
"value": "0"
|
|
1897
|
+
},
|
|
1898
|
+
"named": true,
|
|
1899
|
+
"value": "digit"
|
|
1900
|
+
}
|
|
1901
|
+
]
|
|
1623
1902
|
}
|
|
1624
1903
|
]
|
|
1625
1904
|
},
|
|
@@ -2221,6 +2500,14 @@
|
|
|
2221
2500
|
"unsigned_dec_int",
|
|
2222
2501
|
"_digit"
|
|
2223
2502
|
],
|
|
2503
|
+
[
|
|
2504
|
+
"_digit",
|
|
2505
|
+
"time_hour"
|
|
2506
|
+
],
|
|
2507
|
+
[
|
|
2508
|
+
"_digit1_9",
|
|
2509
|
+
"time_hour"
|
|
2510
|
+
],
|
|
2224
2511
|
[
|
|
2225
2512
|
"offset_date_time",
|
|
2226
2513
|
"local_date_time",
|
package/src/node-types.json
CHANGED
|
@@ -207,6 +207,11 @@
|
|
|
207
207
|
"named": true,
|
|
208
208
|
"fields": {}
|
|
209
209
|
},
|
|
210
|
+
{
|
|
211
|
+
"type": "digit1_9",
|
|
212
|
+
"named": true,
|
|
213
|
+
"fields": {}
|
|
214
|
+
},
|
|
210
215
|
{
|
|
211
216
|
"type": "dotted_key",
|
|
212
217
|
"named": true,
|
|
@@ -1231,10 +1236,6 @@
|
|
|
1231
1236
|
"type": "digit0_7",
|
|
1232
1237
|
"named": true
|
|
1233
1238
|
},
|
|
1234
|
-
{
|
|
1235
|
-
"type": "digit1_9",
|
|
1236
|
-
"named": true
|
|
1237
|
-
},
|
|
1238
1239
|
{
|
|
1239
1240
|
"type": "e",
|
|
1240
1241
|
"named": false
|