Skip to content

Commit 8ba5f03

Browse files
committed
add missing time units (nsecs, usecs, msecs) and anchor to v0.11.0
Fixes 2 test failures caused by unrecognized time units. Remaining 12 failures (1%) are a pre-existing time_unit ambiguity where single- letter units like 's' conflict with identifiers across newlines.
1 parent 894a162 commit 8ba5f03

5 files changed

Lines changed: 6792 additions & 6715 deletions

File tree

tree-sitter-lf/grammar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,8 @@ module.exports = grammar({
607607

608608
time_unit: ($) =>
609609
choice(
610-
'nsec', 'usec', 'msec', 'sec', 'secs', 'second', 'seconds',
610+
'nsec', 'nsecs', 'usec', 'usecs', 'msec', 'msecs',
611+
'sec', 'secs', 'second', 'seconds',
611612
'min', 'mins', 'minute', 'minutes',
612613
'hour', 'hours',
613614
'day', 'days',

tree-sitter-lf/src/grammar.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3486,14 +3486,26 @@
34863486
"type": "STRING",
34873487
"value": "nsec"
34883488
},
3489+
{
3490+
"type": "STRING",
3491+
"value": "nsecs"
3492+
},
34893493
{
34903494
"type": "STRING",
34913495
"value": "usec"
34923496
},
3497+
{
3498+
"type": "STRING",
3499+
"value": "usecs"
3500+
},
34933501
{
34943502
"type": "STRING",
34953503
"value": "msec"
34963504
},
3505+
{
3506+
"type": "STRING",
3507+
"value": "msecs"
3508+
},
34973509
{
34983510
"type": "STRING",
34993511
"value": "sec"

tree-sitter-lf/src/node-types.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2326,6 +2326,10 @@
23262326
"type": "msec",
23272327
"named": false
23282328
},
2329+
{
2330+
"type": "msecs",
2331+
"named": false
2332+
},
23292333
{
23302334
"type": "mutable",
23312335
"named": false
@@ -2350,6 +2354,10 @@
23502354
"type": "nsec",
23512355
"named": false
23522356
},
2357+
{
2358+
"type": "nsecs",
2359+
"named": false
2360+
},
23532361
{
23542362
"type": "output",
23552363
"named": false
@@ -2458,6 +2466,10 @@
24582466
"type": "usec",
24592467
"named": false
24602468
},
2469+
{
2470+
"type": "usecs",
2471+
"named": false
2472+
},
24612473
{
24622474
"type": "watchdog",
24632475
"named": false

0 commit comments

Comments
 (0)