tree-sitter-delphi13-pure 1.2.1 → 1.2.2
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/grammar.js +13 -1
- package/package.json +1 -1
- package/src/grammar.json +72 -2
- package/src/parser.c +315568 -314506
package/grammar.js
CHANGED
|
@@ -700,7 +700,13 @@ module.exports = grammar({
|
|
|
700
700
|
field('body', choice(tr($, 'block'), tr($, 'asm'))),
|
|
701
701
|
),
|
|
702
702
|
|
|
703
|
-
inherited: $ => prec.right(seq($.kInherited, optional(
|
|
703
|
+
inherited: $ => prec.right(seq($.kInherited, optional(choice(
|
|
704
|
+
$.identifier,
|
|
705
|
+
// Soft keyword `at` (raise-with-address) as an INHERITED method
|
|
706
|
+
// name: `inherited At(Offset)` (JCL JclCLR.pas). Mirrors the root
|
|
707
|
+
// full grammar's fix (2026-07-17).
|
|
708
|
+
alias($.kAtWord, $.identifier),
|
|
709
|
+
)))),
|
|
704
710
|
|
|
705
711
|
exprDot: $ => choice(
|
|
706
712
|
op.infix(5, $._ref, $.kDot, $._ref),
|
|
@@ -1198,6 +1204,9 @@ module.exports = grammar({
|
|
|
1198
1204
|
// conflicts with typerefDot in this position.)
|
|
1199
1205
|
seq($.identifier, '.', $.identifier),
|
|
1200
1206
|
seq($.identifier, '(', $.identifier, ')'),
|
|
1207
|
+
// Nested const-expr call bound — `2 .. Succ(High(TV))` (JCL
|
|
1208
|
+
// JclSysUtils). Mirrors the root full grammar's fix (2026-07-17).
|
|
1209
|
+
seq($.identifier, '(', seq($.identifier, '(', $.identifier, ')'), ')'),
|
|
1201
1210
|
// `hid - 1`, `MaxN + 2` — narrow `identifier OP integer` form for
|
|
1202
1211
|
// real-corpus patterns like `TNmbrRange = 0 .. hid - 1;`.
|
|
1203
1212
|
// Kept narrow (no full _expr) to avoid the conflict cascade hit
|
|
@@ -1546,6 +1555,9 @@ module.exports = grammar({
|
|
|
1546
1555
|
field('name', delimited1(choice(
|
|
1547
1556
|
$.identifier,
|
|
1548
1557
|
alias($.kRegister, $.identifier),
|
|
1558
|
+
// `Operator` as a FIELD NAME (JVCL JvXmlDatabase). Mirrors the
|
|
1559
|
+
// root full grammar's fix (2026-07-17).
|
|
1560
|
+
alias($.kOperator, $.identifier),
|
|
1549
1561
|
))),
|
|
1550
1562
|
':',
|
|
1551
1563
|
// Ported from root v1.1.x: field type may be a subrange
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tree-sitter-delphi13-pure",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Pure Delphi 13 tree-sitter sub-grammar — drops {$IFDEF}/pp_* tokens entirely and expects preprocessor-resolved source as input. Pairs with delphi13-preprocessor to reach 99%+ pass on real Delphi 13 corpora.",
|
|
5
5
|
"main": "bindings/node",
|
|
6
6
|
"types": "bindings/node",
|
package/src/grammar.json
CHANGED
|
@@ -3687,8 +3687,22 @@
|
|
|
3687
3687
|
"type": "CHOICE",
|
|
3688
3688
|
"members": [
|
|
3689
3689
|
{
|
|
3690
|
-
"type": "
|
|
3691
|
-
"
|
|
3690
|
+
"type": "CHOICE",
|
|
3691
|
+
"members": [
|
|
3692
|
+
{
|
|
3693
|
+
"type": "SYMBOL",
|
|
3694
|
+
"name": "identifier"
|
|
3695
|
+
},
|
|
3696
|
+
{
|
|
3697
|
+
"type": "ALIAS",
|
|
3698
|
+
"content": {
|
|
3699
|
+
"type": "SYMBOL",
|
|
3700
|
+
"name": "kAtWord"
|
|
3701
|
+
},
|
|
3702
|
+
"named": true,
|
|
3703
|
+
"value": "identifier"
|
|
3704
|
+
}
|
|
3705
|
+
]
|
|
3692
3706
|
},
|
|
3693
3707
|
{
|
|
3694
3708
|
"type": "BLANK"
|
|
@@ -7120,6 +7134,44 @@
|
|
|
7120
7134
|
}
|
|
7121
7135
|
]
|
|
7122
7136
|
},
|
|
7137
|
+
{
|
|
7138
|
+
"type": "SEQ",
|
|
7139
|
+
"members": [
|
|
7140
|
+
{
|
|
7141
|
+
"type": "SYMBOL",
|
|
7142
|
+
"name": "identifier"
|
|
7143
|
+
},
|
|
7144
|
+
{
|
|
7145
|
+
"type": "STRING",
|
|
7146
|
+
"value": "("
|
|
7147
|
+
},
|
|
7148
|
+
{
|
|
7149
|
+
"type": "SEQ",
|
|
7150
|
+
"members": [
|
|
7151
|
+
{
|
|
7152
|
+
"type": "SYMBOL",
|
|
7153
|
+
"name": "identifier"
|
|
7154
|
+
},
|
|
7155
|
+
{
|
|
7156
|
+
"type": "STRING",
|
|
7157
|
+
"value": "("
|
|
7158
|
+
},
|
|
7159
|
+
{
|
|
7160
|
+
"type": "SYMBOL",
|
|
7161
|
+
"name": "identifier"
|
|
7162
|
+
},
|
|
7163
|
+
{
|
|
7164
|
+
"type": "STRING",
|
|
7165
|
+
"value": ")"
|
|
7166
|
+
}
|
|
7167
|
+
]
|
|
7168
|
+
},
|
|
7169
|
+
{
|
|
7170
|
+
"type": "STRING",
|
|
7171
|
+
"value": ")"
|
|
7172
|
+
}
|
|
7173
|
+
]
|
|
7174
|
+
},
|
|
7123
7175
|
{
|
|
7124
7176
|
"type": "SEQ",
|
|
7125
7177
|
"members": [
|
|
@@ -9580,6 +9632,15 @@
|
|
|
9580
9632
|
},
|
|
9581
9633
|
"named": true,
|
|
9582
9634
|
"value": "identifier"
|
|
9635
|
+
},
|
|
9636
|
+
{
|
|
9637
|
+
"type": "ALIAS",
|
|
9638
|
+
"content": {
|
|
9639
|
+
"type": "SYMBOL",
|
|
9640
|
+
"name": "kOperator"
|
|
9641
|
+
},
|
|
9642
|
+
"named": true,
|
|
9643
|
+
"value": "identifier"
|
|
9583
9644
|
}
|
|
9584
9645
|
]
|
|
9585
9646
|
},
|
|
@@ -9611,6 +9672,15 @@
|
|
|
9611
9672
|
},
|
|
9612
9673
|
"named": true,
|
|
9613
9674
|
"value": "identifier"
|
|
9675
|
+
},
|
|
9676
|
+
{
|
|
9677
|
+
"type": "ALIAS",
|
|
9678
|
+
"content": {
|
|
9679
|
+
"type": "SYMBOL",
|
|
9680
|
+
"name": "kOperator"
|
|
9681
|
+
},
|
|
9682
|
+
"named": true,
|
|
9683
|
+
"value": "identifier"
|
|
9614
9684
|
}
|
|
9615
9685
|
]
|
|
9616
9686
|
}
|