circuitscript 0.1.9 → 0.1.11
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/dist/cjs/SemanticTokenVisitor.js +6 -1
- package/dist/cjs/antlr/CircuitScriptParser.js +144 -137
- package/dist/cjs/builtinMethods.js +15 -0
- package/dist/cjs/draw_symbols.js +2 -1
- package/dist/cjs/geometry.js +3 -9
- package/dist/cjs/validate/SymbolValidatorVisitor.js +5 -0
- package/dist/cjs/visitor.js +24 -7
- package/dist/esm/SemanticTokenVisitor.js +6 -1
- package/dist/esm/antlr/CircuitScriptParser.js +144 -137
- package/dist/esm/builtinMethods.js +15 -0
- package/dist/esm/draw_symbols.js +2 -1
- package/dist/esm/geometry.js +3 -9
- package/dist/esm/validate/SymbolValidatorVisitor.js +5 -0
- package/dist/esm/visitor.js +24 -7
- package/dist/types/SemanticTokenVisitor.d.ts +2 -1
- package/dist/types/antlr/CircuitScriptParser.d.ts +3 -3
- package/dist/types/geometry.d.ts +0 -1
- package/dist/types/validate/SymbolValidatorVisitor.d.ts +2 -1
- package/package.json +3 -2
|
@@ -724,21 +724,13 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
724
724
|
pin_select_expr() {
|
|
725
725
|
let localContext = new Pin_select_exprContext(this.context, this.state);
|
|
726
726
|
this.enterRule(localContext, 14, CircuitScriptParser.RULE_pin_select_expr);
|
|
727
|
-
let _la;
|
|
728
727
|
try {
|
|
729
728
|
this.enterOuterAlt(localContext, 1);
|
|
730
729
|
{
|
|
731
730
|
this.state = 202;
|
|
732
731
|
this.match(CircuitScriptParser.Pin);
|
|
733
732
|
this.state = 203;
|
|
734
|
-
|
|
735
|
-
if (!(_la === 57 || _la === 60)) {
|
|
736
|
-
this.errorHandler.recoverInline(this);
|
|
737
|
-
}
|
|
738
|
-
else {
|
|
739
|
-
this.errorHandler.reportMatch(this);
|
|
740
|
-
this.consume();
|
|
741
|
-
}
|
|
733
|
+
this.data_expr(0);
|
|
742
734
|
}
|
|
743
735
|
}
|
|
744
736
|
catch (re) {
|
|
@@ -3348,8 +3340,22 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3348
3340
|
{
|
|
3349
3341
|
this.state = 630;
|
|
3350
3342
|
this.match(CircuitScriptParser.Point);
|
|
3351
|
-
this.state =
|
|
3352
|
-
this.
|
|
3343
|
+
this.state = 633;
|
|
3344
|
+
this.errorHandler.sync(this);
|
|
3345
|
+
switch (this.interpreter.adaptivePredict(this.tokenStream, 69, this.context)) {
|
|
3346
|
+
case 1:
|
|
3347
|
+
{
|
|
3348
|
+
this.state = 631;
|
|
3349
|
+
this.match(CircuitScriptParser.ID);
|
|
3350
|
+
}
|
|
3351
|
+
break;
|
|
3352
|
+
case 2:
|
|
3353
|
+
{
|
|
3354
|
+
this.state = 632;
|
|
3355
|
+
this.data_expr(0);
|
|
3356
|
+
}
|
|
3357
|
+
break;
|
|
3358
|
+
}
|
|
3353
3359
|
}
|
|
3354
3360
|
}
|
|
3355
3361
|
catch (re) {
|
|
@@ -3372,9 +3378,9 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3372
3378
|
try {
|
|
3373
3379
|
this.enterOuterAlt(localContext, 1);
|
|
3374
3380
|
{
|
|
3375
|
-
this.state =
|
|
3381
|
+
this.state = 635;
|
|
3376
3382
|
this.match(CircuitScriptParser.Import);
|
|
3377
|
-
this.state =
|
|
3383
|
+
this.state = 636;
|
|
3378
3384
|
this.match(CircuitScriptParser.ID);
|
|
3379
3385
|
}
|
|
3380
3386
|
}
|
|
@@ -3399,7 +3405,7 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3399
3405
|
try {
|
|
3400
3406
|
this.enterOuterAlt(localContext, 1);
|
|
3401
3407
|
{
|
|
3402
|
-
this.state =
|
|
3408
|
+
this.state = 638;
|
|
3403
3409
|
_la = this.tokenStream.LA(1);
|
|
3404
3410
|
if (!(_la === 32 || _la === 33)) {
|
|
3405
3411
|
this.errorHandler.recoverInline(this);
|
|
@@ -3408,9 +3414,9 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3408
3414
|
this.errorHandler.reportMatch(this);
|
|
3409
3415
|
this.consume();
|
|
3410
3416
|
}
|
|
3411
|
-
this.state =
|
|
3417
|
+
this.state = 639;
|
|
3412
3418
|
this.match(CircuitScriptParser.T__0);
|
|
3413
|
-
this.state =
|
|
3419
|
+
this.state = 640;
|
|
3414
3420
|
this.expressions_block();
|
|
3415
3421
|
}
|
|
3416
3422
|
}
|
|
@@ -3436,36 +3442,36 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3436
3442
|
let alternative;
|
|
3437
3443
|
this.enterOuterAlt(localContext, 1);
|
|
3438
3444
|
{
|
|
3439
|
-
this.state =
|
|
3445
|
+
this.state = 642;
|
|
3440
3446
|
this.match(CircuitScriptParser.If);
|
|
3441
|
-
this.state =
|
|
3447
|
+
this.state = 643;
|
|
3442
3448
|
this.data_expr(0);
|
|
3443
|
-
this.state =
|
|
3449
|
+
this.state = 644;
|
|
3444
3450
|
this.match(CircuitScriptParser.T__0);
|
|
3445
|
-
this.state =
|
|
3451
|
+
this.state = 645;
|
|
3446
3452
|
this.expressions_block();
|
|
3447
|
-
this.state =
|
|
3453
|
+
this.state = 649;
|
|
3448
3454
|
this.errorHandler.sync(this);
|
|
3449
|
-
alternative = this.interpreter.adaptivePredict(this.tokenStream,
|
|
3455
|
+
alternative = this.interpreter.adaptivePredict(this.tokenStream, 70, this.context);
|
|
3450
3456
|
while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) {
|
|
3451
3457
|
if (alternative === 1) {
|
|
3452
3458
|
{
|
|
3453
3459
|
{
|
|
3454
|
-
this.state =
|
|
3460
|
+
this.state = 646;
|
|
3455
3461
|
this.if_inner_expr();
|
|
3456
3462
|
}
|
|
3457
3463
|
}
|
|
3458
3464
|
}
|
|
3459
|
-
this.state =
|
|
3465
|
+
this.state = 651;
|
|
3460
3466
|
this.errorHandler.sync(this);
|
|
3461
|
-
alternative = this.interpreter.adaptivePredict(this.tokenStream,
|
|
3467
|
+
alternative = this.interpreter.adaptivePredict(this.tokenStream, 70, this.context);
|
|
3462
3468
|
}
|
|
3463
|
-
this.state =
|
|
3469
|
+
this.state = 653;
|
|
3464
3470
|
this.errorHandler.sync(this);
|
|
3465
3471
|
_la = this.tokenStream.LA(1);
|
|
3466
3472
|
if (_la === 30) {
|
|
3467
3473
|
{
|
|
3468
|
-
this.state =
|
|
3474
|
+
this.state = 652;
|
|
3469
3475
|
this.else_expr();
|
|
3470
3476
|
}
|
|
3471
3477
|
}
|
|
@@ -3491,15 +3497,15 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3491
3497
|
try {
|
|
3492
3498
|
this.enterOuterAlt(localContext, 1);
|
|
3493
3499
|
{
|
|
3494
|
-
this.state =
|
|
3500
|
+
this.state = 655;
|
|
3495
3501
|
this.match(CircuitScriptParser.Else);
|
|
3496
|
-
this.state =
|
|
3502
|
+
this.state = 656;
|
|
3497
3503
|
this.match(CircuitScriptParser.If);
|
|
3498
|
-
this.state =
|
|
3504
|
+
this.state = 657;
|
|
3499
3505
|
this.data_expr(0);
|
|
3500
|
-
this.state =
|
|
3506
|
+
this.state = 658;
|
|
3501
3507
|
this.match(CircuitScriptParser.T__0);
|
|
3502
|
-
this.state =
|
|
3508
|
+
this.state = 659;
|
|
3503
3509
|
this.expressions_block();
|
|
3504
3510
|
}
|
|
3505
3511
|
}
|
|
@@ -3523,11 +3529,11 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3523
3529
|
try {
|
|
3524
3530
|
this.enterOuterAlt(localContext, 1);
|
|
3525
3531
|
{
|
|
3526
|
-
this.state =
|
|
3532
|
+
this.state = 661;
|
|
3527
3533
|
this.match(CircuitScriptParser.Else);
|
|
3528
|
-
this.state =
|
|
3534
|
+
this.state = 662;
|
|
3529
3535
|
this.match(CircuitScriptParser.T__0);
|
|
3530
|
-
this.state =
|
|
3536
|
+
this.state = 663;
|
|
3531
3537
|
this.expressions_block();
|
|
3532
3538
|
}
|
|
3533
3539
|
}
|
|
@@ -3551,13 +3557,13 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3551
3557
|
try {
|
|
3552
3558
|
this.enterOuterAlt(localContext, 1);
|
|
3553
3559
|
{
|
|
3554
|
-
this.state =
|
|
3560
|
+
this.state = 665;
|
|
3555
3561
|
this.match(CircuitScriptParser.While);
|
|
3556
|
-
this.state =
|
|
3562
|
+
this.state = 666;
|
|
3557
3563
|
this.data_expr(0);
|
|
3558
|
-
this.state =
|
|
3564
|
+
this.state = 667;
|
|
3559
3565
|
this.match(CircuitScriptParser.T__0);
|
|
3560
|
-
this.state =
|
|
3566
|
+
this.state = 668;
|
|
3561
3567
|
this.expressions_block();
|
|
3562
3568
|
}
|
|
3563
3569
|
}
|
|
@@ -3582,33 +3588,33 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3582
3588
|
try {
|
|
3583
3589
|
this.enterOuterAlt(localContext, 1);
|
|
3584
3590
|
{
|
|
3585
|
-
this.state =
|
|
3591
|
+
this.state = 670;
|
|
3586
3592
|
this.match(CircuitScriptParser.For);
|
|
3587
|
-
this.state =
|
|
3593
|
+
this.state = 671;
|
|
3588
3594
|
this.match(CircuitScriptParser.ID);
|
|
3589
|
-
this.state =
|
|
3595
|
+
this.state = 676;
|
|
3590
3596
|
this.errorHandler.sync(this);
|
|
3591
3597
|
_la = this.tokenStream.LA(1);
|
|
3592
3598
|
while (_la === 2) {
|
|
3593
3599
|
{
|
|
3594
3600
|
{
|
|
3595
|
-
this.state =
|
|
3601
|
+
this.state = 672;
|
|
3596
3602
|
this.match(CircuitScriptParser.T__1);
|
|
3597
|
-
this.state =
|
|
3603
|
+
this.state = 673;
|
|
3598
3604
|
this.match(CircuitScriptParser.ID);
|
|
3599
3605
|
}
|
|
3600
3606
|
}
|
|
3601
|
-
this.state =
|
|
3607
|
+
this.state = 678;
|
|
3602
3608
|
this.errorHandler.sync(this);
|
|
3603
3609
|
_la = this.tokenStream.LA(1);
|
|
3604
3610
|
}
|
|
3605
|
-
this.state =
|
|
3611
|
+
this.state = 679;
|
|
3606
3612
|
this.match(CircuitScriptParser.In);
|
|
3607
|
-
this.state =
|
|
3613
|
+
this.state = 680;
|
|
3608
3614
|
this.data_expr(0);
|
|
3609
|
-
this.state =
|
|
3615
|
+
this.state = 681;
|
|
3610
3616
|
this.match(CircuitScriptParser.T__0);
|
|
3611
|
-
this.state =
|
|
3617
|
+
this.state = 682;
|
|
3612
3618
|
this.expressions_block();
|
|
3613
3619
|
}
|
|
3614
3620
|
}
|
|
@@ -3647,7 +3653,7 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3647
3653
|
return true;
|
|
3648
3654
|
}
|
|
3649
3655
|
static _serializedATN = [
|
|
3650
|
-
4, 1, 67,
|
|
3656
|
+
4, 1, 67, 685, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7,
|
|
3651
3657
|
6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13,
|
|
3652
3658
|
2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20,
|
|
3653
3659
|
7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26,
|
|
@@ -3700,69 +3706,69 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3700
3706
|
52, 596, 9, 52, 3, 52, 598, 8, 52, 1, 53, 1, 53, 1, 53, 3, 53, 603, 8, 53, 1, 53, 3, 53,
|
|
3701
3707
|
606, 8, 53, 1, 54, 1, 54, 5, 54, 610, 8, 54, 10, 54, 12, 54, 613, 9, 54, 1, 55, 1, 55,
|
|
3702
3708
|
1, 55, 1, 55, 5, 55, 619, 8, 55, 10, 55, 12, 55, 622, 9, 55, 5, 55, 624, 8, 55, 10, 55,
|
|
3703
|
-
12, 55, 627, 9, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56,
|
|
3704
|
-
1, 58, 1, 58, 1,
|
|
3705
|
-
|
|
3706
|
-
1, 61, 1, 61, 1,
|
|
3707
|
-
|
|
3708
|
-
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34,
|
|
3709
|
-
46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78,
|
|
3710
|
-
90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116,
|
|
3711
|
-
126, 0, 14, 2, 0, 9, 9, 19, 21, 1, 0, 56, 57, 2, 0, 57, 57, 60, 60,
|
|
3712
|
-
1, 0, 47, 51, 1, 0, 44, 46, 1, 0, 42, 43, 1, 0, 40, 41, 1, 0, 34, 39,
|
|
3713
|
-
2, 0,
|
|
3714
|
-
|
|
3715
|
-
0, 0,
|
|
3716
|
-
|
|
3717
|
-
1, 0, 0, 0,
|
|
3718
|
-
0, 0,
|
|
3719
|
-
|
|
3720
|
-
1, 0, 0, 0,
|
|
3721
|
-
0, 0,
|
|
3722
|
-
|
|
3723
|
-
1, 0, 0, 0,
|
|
3724
|
-
0, 0,
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
137,
|
|
3733
|
-
140, 141, 1, 0, 0, 0, 141, 142, 5, 0, 0, 1, 142, 1, 1, 0, 0, 0, 143,
|
|
3734
|
-
144, 166, 3, 28, 14, 0, 145, 166, 3, 26, 13, 0, 146, 166, 3, 50, 25,
|
|
3735
|
-
52, 26, 0, 148, 166, 3, 58, 29, 0, 149, 166, 3, 10, 5, 0, 150, 166, 3,
|
|
3736
|
-
166, 3, 46, 23, 0, 152, 166, 3, 48, 24, 0, 153, 166, 3, 70, 35, 0, 154,
|
|
3737
|
-
0, 155, 166, 3, 108, 54, 0, 156, 166, 3, 114, 57, 0, 157, 166, 3, 116,
|
|
3738
|
-
3, 76, 38, 0, 159, 166, 3, 36, 18, 0, 160, 166, 3, 6, 3, 0, 161, 166,
|
|
3739
|
-
166, 3, 118, 59, 0, 163, 166, 3, 124, 62, 0, 164, 166, 3, 126, 63,
|
|
3740
|
-
0,
|
|
3741
|
-
0,
|
|
3742
|
-
0,
|
|
3743
|
-
0,
|
|
3744
|
-
0,
|
|
3745
|
-
0, 0, 165, 164, 1, 0, 0, 0, 166, 3, 1, 0, 0, 0, 167, 168, 5, 64, 0, 0,
|
|
3746
|
-
0, 0, 169, 172, 5, 64, 0, 0, 170, 172, 3, 2, 1, 0, 171, 169, 1, 0, 0,
|
|
3747
|
-
0,
|
|
3748
|
-
0, 0, 175, 176, 5, 67, 0, 0, 176, 5, 1, 0, 0, 0, 177, 179, 3, 8, 4, 0,
|
|
3749
|
-
|
|
3750
|
-
182, 183, 7, 0, 0, 0, 183, 184, 5, 1, 0, 0, 184, 185, 3, 4, 2, 0, 185,
|
|
3751
|
-
187, 3, 76, 38, 0, 187, 188, 5, 1, 0, 0, 188, 189, 5, 64, 0, 0, 189,
|
|
3752
|
-
190, 193, 5, 64, 0, 0, 191, 193, 3, 12, 6, 0, 192, 190, 1, 0, 0, 0, 192,
|
|
3753
|
-
0, 193, 194, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195,
|
|
3754
|
-
0, 196, 197, 5, 67, 0, 0, 197, 11, 1, 0, 0, 0, 198, 199, 7, 1, 0, 0, 199,
|
|
3755
|
-
0, 200, 201, 3, 68, 34, 0, 201, 13, 1, 0, 0, 0, 202, 203, 5, 15, 0, 0, 203,
|
|
3756
|
-
|
|
3757
|
-
34, 0, 208, 210, 5, 56, 0, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210,
|
|
3758
|
-
0, 0, 211, 214, 3, 62, 31, 0, 212, 214, 3, 50, 25, 0, 213, 211, 1, 0, 0, 0, 213,
|
|
3759
|
-
1, 0, 0, 0, 214, 218, 1, 0, 0, 0, 215, 217, 3, 16, 8, 0, 216, 215, 1, 0, 0, 0, 217,
|
|
3760
|
-
1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220,
|
|
3761
|
-
1, 0, 0, 0, 221, 223, 3, 14, 7, 0, 222, 221, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223,
|
|
3762
|
-
1, 0, 0, 0, 224, 225, 5, 16, 0, 0, 225, 226, 3, 18, 9, 0, 226, 21, 1, 0, 0, 0, 227,
|
|
3763
|
-
3, 18, 9, 0, 228, 231, 3, 14, 7, 0, 229, 231, 5, 19, 0, 0, 230, 227, 1, 0, 0, 0, 230,
|
|
3764
|
-
1, 0, 0, 0, 230, 229, 1, 0, 0, 0, 231, 23, 1, 0, 0, 0, 232, 233, 7, 2, 0, 0, 233, 25,
|
|
3765
|
-
0, 0, 0, 234, 235, 5, 17, 0, 0, 235, 236, 3, 22, 11, 0, 236, 27, 1, 0, 0, 0, 237, 238,
|
|
3709
|
+
12, 55, 627, 9, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 3, 56, 634, 8, 56, 1, 57, 1, 57,
|
|
3710
|
+
1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 5, 59, 648, 8, 59,
|
|
3711
|
+
10, 59, 12, 59, 651, 9, 59, 1, 59, 3, 59, 654, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60,
|
|
3712
|
+
1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63,
|
|
3713
|
+
1, 63, 5, 63, 675, 8, 63, 10, 63, 12, 63, 678, 9, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63,
|
|
3714
|
+
1, 63, 0, 1, 62, 64, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34,
|
|
3715
|
+
36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78,
|
|
3716
|
+
80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116,
|
|
3717
|
+
118, 120, 122, 124, 126, 0, 14, 2, 0, 9, 9, 19, 21, 1, 0, 56, 57, 2, 0, 57, 57, 60, 60,
|
|
3718
|
+
2, 0, 54, 54, 57, 57, 1, 0, 47, 51, 1, 0, 44, 46, 1, 0, 42, 43, 1, 0, 40, 41, 1, 0, 34, 39,
|
|
3719
|
+
2, 0, 31, 31, 43, 43, 2, 0, 55, 55, 57, 61, 2, 0, 15, 15, 56, 56, 2, 0, 56, 57, 60, 60,
|
|
3720
|
+
1, 0, 32, 33, 724, 0, 132, 1, 0, 0, 0, 2, 165, 1, 0, 0, 0, 4, 167, 1, 0, 0, 0, 6, 178, 1,
|
|
3721
|
+
0, 0, 0, 8, 182, 1, 0, 0, 0, 10, 186, 1, 0, 0, 0, 12, 198, 1, 0, 0, 0, 14, 202, 1, 0, 0, 0,
|
|
3722
|
+
16, 205, 1, 0, 0, 0, 18, 213, 1, 0, 0, 0, 20, 224, 1, 0, 0, 0, 22, 230, 1, 0, 0, 0, 24, 232,
|
|
3723
|
+
1, 0, 0, 0, 26, 234, 1, 0, 0, 0, 28, 237, 1, 0, 0, 0, 30, 246, 1, 0, 0, 0, 32, 268, 1, 0,
|
|
3724
|
+
0, 0, 34, 278, 1, 0, 0, 0, 36, 280, 1, 0, 0, 0, 38, 294, 1, 0, 0, 0, 40, 296, 1, 0, 0, 0,
|
|
3725
|
+
42, 304, 1, 0, 0, 0, 44, 306, 1, 0, 0, 0, 46, 308, 1, 0, 0, 0, 48, 310, 1, 0, 0, 0, 50, 312,
|
|
3726
|
+
1, 0, 0, 0, 52, 316, 1, 0, 0, 0, 54, 320, 1, 0, 0, 0, 56, 347, 1, 0, 0, 0, 58, 349, 1, 0,
|
|
3727
|
+
0, 0, 60, 353, 1, 0, 0, 0, 62, 375, 1, 0, 0, 0, 64, 395, 1, 0, 0, 0, 66, 397, 1, 0, 0, 0,
|
|
3728
|
+
68, 400, 1, 0, 0, 0, 70, 404, 1, 0, 0, 0, 72, 424, 1, 0, 0, 0, 74, 455, 1, 0, 0, 0, 76, 457,
|
|
3729
|
+
1, 0, 0, 0, 78, 472, 1, 0, 0, 0, 80, 475, 1, 0, 0, 0, 82, 484, 1, 0, 0, 0, 84, 490, 1, 0,
|
|
3730
|
+
0, 0, 86, 493, 1, 0, 0, 0, 88, 497, 1, 0, 0, 0, 90, 510, 1, 0, 0, 0, 92, 520, 1, 0, 0, 0,
|
|
3731
|
+
94, 530, 1, 0, 0, 0, 96, 544, 1, 0, 0, 0, 98, 580, 1, 0, 0, 0, 100, 582, 1, 0, 0, 0, 102,
|
|
3732
|
+
586, 1, 0, 0, 0, 104, 597, 1, 0, 0, 0, 106, 605, 1, 0, 0, 0, 108, 607, 1, 0, 0, 0, 110,
|
|
3733
|
+
614, 1, 0, 0, 0, 112, 630, 1, 0, 0, 0, 114, 635, 1, 0, 0, 0, 116, 638, 1, 0, 0, 0, 118,
|
|
3734
|
+
642, 1, 0, 0, 0, 120, 655, 1, 0, 0, 0, 122, 661, 1, 0, 0, 0, 124, 665, 1, 0, 0, 0, 126,
|
|
3735
|
+
670, 1, 0, 0, 0, 128, 131, 3, 114, 57, 0, 129, 131, 5, 64, 0, 0, 130, 128, 1, 0, 0, 0,
|
|
3736
|
+
130, 129, 1, 0, 0, 0, 131, 134, 1, 0, 0, 0, 132, 130, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0,
|
|
3737
|
+
133, 137, 1, 0, 0, 0, 134, 132, 1, 0, 0, 0, 135, 138, 3, 2, 1, 0, 136, 138, 5, 64, 0, 0,
|
|
3738
|
+
137, 135, 1, 0, 0, 0, 137, 136, 1, 0, 0, 0, 138, 139, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0,
|
|
3739
|
+
139, 140, 1, 0, 0, 0, 140, 141, 1, 0, 0, 0, 141, 142, 5, 0, 0, 1, 142, 1, 1, 0, 0, 0, 143,
|
|
3740
|
+
166, 3, 20, 10, 0, 144, 166, 3, 28, 14, 0, 145, 166, 3, 26, 13, 0, 146, 166, 3, 50, 25,
|
|
3741
|
+
0, 147, 166, 3, 52, 26, 0, 148, 166, 3, 58, 29, 0, 149, 166, 3, 10, 5, 0, 150, 166, 3,
|
|
3742
|
+
60, 30, 0, 151, 166, 3, 46, 23, 0, 152, 166, 3, 48, 24, 0, 153, 166, 3, 70, 35, 0, 154,
|
|
3743
|
+
166, 3, 80, 40, 0, 155, 166, 3, 108, 54, 0, 156, 166, 3, 114, 57, 0, 157, 166, 3, 116,
|
|
3744
|
+
58, 0, 158, 166, 3, 76, 38, 0, 159, 166, 3, 36, 18, 0, 160, 166, 3, 6, 3, 0, 161, 166,
|
|
3745
|
+
3, 112, 56, 0, 162, 166, 3, 118, 59, 0, 163, 166, 3, 124, 62, 0, 164, 166, 3, 126, 63,
|
|
3746
|
+
0, 165, 143, 1, 0, 0, 0, 165, 144, 1, 0, 0, 0, 165, 145, 1, 0, 0, 0, 165, 146, 1, 0, 0,
|
|
3747
|
+
0, 165, 147, 1, 0, 0, 0, 165, 148, 1, 0, 0, 0, 165, 149, 1, 0, 0, 0, 165, 150, 1, 0, 0,
|
|
3748
|
+
0, 165, 151, 1, 0, 0, 0, 165, 152, 1, 0, 0, 0, 165, 153, 1, 0, 0, 0, 165, 154, 1, 0, 0,
|
|
3749
|
+
0, 165, 155, 1, 0, 0, 0, 165, 156, 1, 0, 0, 0, 165, 157, 1, 0, 0, 0, 165, 158, 1, 0, 0,
|
|
3750
|
+
0, 165, 159, 1, 0, 0, 0, 165, 160, 1, 0, 0, 0, 165, 161, 1, 0, 0, 0, 165, 162, 1, 0, 0,
|
|
3751
|
+
0, 165, 163, 1, 0, 0, 0, 165, 164, 1, 0, 0, 0, 166, 3, 1, 0, 0, 0, 167, 168, 5, 64, 0, 0,
|
|
3752
|
+
168, 171, 5, 66, 0, 0, 169, 172, 5, 64, 0, 0, 170, 172, 3, 2, 1, 0, 171, 169, 1, 0, 0,
|
|
3753
|
+
0, 171, 170, 1, 0, 0, 0, 172, 173, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0,
|
|
3754
|
+
0, 174, 175, 1, 0, 0, 0, 175, 176, 5, 67, 0, 0, 176, 5, 1, 0, 0, 0, 177, 179, 3, 8, 4, 0,
|
|
3755
|
+
178, 177, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0,
|
|
3756
|
+
181, 7, 1, 0, 0, 0, 182, 183, 7, 0, 0, 0, 183, 184, 5, 1, 0, 0, 184, 185, 3, 4, 2, 0, 185,
|
|
3757
|
+
9, 1, 0, 0, 0, 186, 187, 3, 76, 38, 0, 187, 188, 5, 1, 0, 0, 188, 189, 5, 64, 0, 0, 189,
|
|
3758
|
+
192, 5, 66, 0, 0, 190, 193, 5, 64, 0, 0, 191, 193, 3, 12, 6, 0, 192, 190, 1, 0, 0, 0, 192,
|
|
3759
|
+
191, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195,
|
|
3760
|
+
196, 1, 0, 0, 0, 196, 197, 5, 67, 0, 0, 197, 11, 1, 0, 0, 0, 198, 199, 7, 1, 0, 0, 199,
|
|
3761
|
+
200, 5, 1, 0, 0, 200, 201, 3, 68, 34, 0, 201, 13, 1, 0, 0, 0, 202, 203, 5, 15, 0, 0, 203,
|
|
3762
|
+
204, 3, 62, 31, 0, 204, 15, 1, 0, 0, 0, 205, 206, 5, 56, 0, 0, 206, 209, 5, 1, 0, 0, 207,
|
|
3763
|
+
210, 3, 68, 34, 0, 208, 210, 5, 56, 0, 0, 209, 207, 1, 0, 0, 0, 209, 208, 1, 0, 0, 0, 210,
|
|
3764
|
+
17, 1, 0, 0, 0, 211, 214, 3, 62, 31, 0, 212, 214, 3, 50, 25, 0, 213, 211, 1, 0, 0, 0, 213,
|
|
3765
|
+
212, 1, 0, 0, 0, 214, 218, 1, 0, 0, 0, 215, 217, 3, 16, 8, 0, 216, 215, 1, 0, 0, 0, 217,
|
|
3766
|
+
220, 1, 0, 0, 0, 218, 216, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220,
|
|
3767
|
+
218, 1, 0, 0, 0, 221, 223, 3, 14, 7, 0, 222, 221, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223,
|
|
3768
|
+
19, 1, 0, 0, 0, 224, 225, 5, 16, 0, 0, 225, 226, 3, 18, 9, 0, 226, 21, 1, 0, 0, 0, 227,
|
|
3769
|
+
231, 3, 18, 9, 0, 228, 231, 3, 14, 7, 0, 229, 231, 5, 19, 0, 0, 230, 227, 1, 0, 0, 0, 230,
|
|
3770
|
+
228, 1, 0, 0, 0, 230, 229, 1, 0, 0, 0, 231, 23, 1, 0, 0, 0, 232, 233, 7, 2, 0, 0, 233, 25,
|
|
3771
|
+
1, 0, 0, 0, 234, 235, 5, 17, 0, 0, 235, 236, 3, 22, 11, 0, 236, 27, 1, 0, 0, 0, 237, 238,
|
|
3766
3772
|
5, 18, 0, 0, 238, 243, 3, 22, 11, 0, 239, 240, 5, 2, 0, 0, 240, 242, 3, 22, 11, 0, 241,
|
|
3767
3773
|
239, 1, 0, 0, 0, 242, 245, 1, 0, 0, 0, 243, 241, 1, 0, 0, 0, 243, 244, 1, 0, 0, 0, 244,
|
|
3768
3774
|
29, 1, 0, 0, 0, 245, 243, 1, 0, 0, 0, 246, 247, 5, 17, 0, 0, 247, 248, 3, 22, 11, 0, 248,
|
|
@@ -3878,25 +3884,26 @@ export class CircuitScriptParser extends antlr.Parser {
|
|
|
3878
3884
|
3, 62, 31, 0, 618, 616, 1, 0, 0, 0, 619, 622, 1, 0, 0, 0, 620, 618, 1, 0, 0, 0, 620, 621,
|
|
3879
3885
|
1, 0, 0, 0, 621, 624, 1, 0, 0, 0, 622, 620, 1, 0, 0, 0, 623, 615, 1, 0, 0, 0, 624, 627,
|
|
3880
3886
|
1, 0, 0, 0, 625, 623, 1, 0, 0, 0, 625, 626, 1, 0, 0, 0, 626, 628, 1, 0, 0, 0, 627, 625,
|
|
3881
|
-
1, 0, 0, 0, 628, 629, 5, 7, 0, 0, 629, 111, 1, 0, 0, 0, 630,
|
|
3882
|
-
5, 56, 0, 0, 632,
|
|
3883
|
-
1, 0, 0, 0,
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
681, 3,
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3887
|
+
1, 0, 0, 0, 628, 629, 5, 7, 0, 0, 629, 111, 1, 0, 0, 0, 630, 633, 5, 19, 0, 0, 631, 634,
|
|
3888
|
+
5, 56, 0, 0, 632, 634, 3, 62, 31, 0, 633, 631, 1, 0, 0, 0, 633, 632, 1, 0, 0, 0, 634, 113,
|
|
3889
|
+
1, 0, 0, 0, 635, 636, 5, 24, 0, 0, 636, 637, 5, 56, 0, 0, 637, 115, 1, 0, 0, 0, 638, 639,
|
|
3890
|
+
7, 13, 0, 0, 639, 640, 5, 1, 0, 0, 640, 641, 3, 4, 2, 0, 641, 117, 1, 0, 0, 0, 642, 643,
|
|
3891
|
+
5, 29, 0, 0, 643, 644, 3, 62, 31, 0, 644, 645, 5, 1, 0, 0, 645, 649, 3, 4, 2, 0, 646, 648,
|
|
3892
|
+
3, 120, 60, 0, 647, 646, 1, 0, 0, 0, 648, 651, 1, 0, 0, 0, 649, 647, 1, 0, 0, 0, 649, 650,
|
|
3893
|
+
1, 0, 0, 0, 650, 653, 1, 0, 0, 0, 651, 649, 1, 0, 0, 0, 652, 654, 3, 122, 61, 0, 653, 652,
|
|
3894
|
+
1, 0, 0, 0, 653, 654, 1, 0, 0, 0, 654, 119, 1, 0, 0, 0, 655, 656, 5, 30, 0, 0, 656, 657,
|
|
3895
|
+
5, 29, 0, 0, 657, 658, 3, 62, 31, 0, 658, 659, 5, 1, 0, 0, 659, 660, 3, 4, 2, 0, 660, 121,
|
|
3896
|
+
1, 0, 0, 0, 661, 662, 5, 30, 0, 0, 662, 663, 5, 1, 0, 0, 663, 664, 3, 4, 2, 0, 664, 123,
|
|
3897
|
+
1, 0, 0, 0, 665, 666, 5, 27, 0, 0, 666, 667, 3, 62, 31, 0, 667, 668, 5, 1, 0, 0, 668, 669,
|
|
3898
|
+
3, 4, 2, 0, 669, 125, 1, 0, 0, 0, 670, 671, 5, 25, 0, 0, 671, 676, 5, 56, 0, 0, 672, 673,
|
|
3899
|
+
5, 2, 0, 0, 673, 675, 5, 56, 0, 0, 674, 672, 1, 0, 0, 0, 675, 678, 1, 0, 0, 0, 676, 674,
|
|
3900
|
+
1, 0, 0, 0, 676, 677, 1, 0, 0, 0, 677, 679, 1, 0, 0, 0, 678, 676, 1, 0, 0, 0, 679, 680,
|
|
3901
|
+
5, 26, 0, 0, 680, 681, 3, 62, 31, 0, 681, 682, 5, 1, 0, 0, 682, 683, 3, 4, 2, 0, 683, 127,
|
|
3902
|
+
1, 0, 0, 0, 73, 130, 132, 137, 139, 165, 171, 173, 180, 192, 194, 209, 213, 218, 222,
|
|
3903
|
+
230, 243, 254, 262, 264, 275, 286, 288, 294, 300, 304, 329, 336, 344, 347, 365,
|
|
3904
|
+
375, 390, 392, 400, 408, 416, 418, 424, 431, 440, 452, 455, 462, 467, 472, 475,
|
|
3905
|
+
481, 484, 488, 504, 506, 514, 516, 525, 538, 540, 548, 550, 556, 564, 572, 580,
|
|
3906
|
+
594, 597, 602, 605, 611, 620, 625, 633, 649, 653, 676
|
|
3900
3907
|
];
|
|
3901
3908
|
static __ATN;
|
|
3902
3909
|
static get _ATN() {
|
|
@@ -4192,11 +4199,8 @@ export class Pin_select_exprContext extends antlr.ParserRuleContext {
|
|
|
4192
4199
|
Pin() {
|
|
4193
4200
|
return this.getToken(CircuitScriptParser.Pin, 0);
|
|
4194
4201
|
}
|
|
4195
|
-
|
|
4196
|
-
return this.
|
|
4197
|
-
}
|
|
4198
|
-
STRING_VALUE() {
|
|
4199
|
-
return this.getToken(CircuitScriptParser.STRING_VALUE, 0);
|
|
4202
|
+
data_expr() {
|
|
4203
|
+
return this.getRuleContext(0, Data_exprContext);
|
|
4200
4204
|
}
|
|
4201
4205
|
get ruleIndex() {
|
|
4202
4206
|
return CircuitScriptParser.RULE_pin_select_expr;
|
|
@@ -5854,6 +5858,9 @@ export class Point_exprContext extends antlr.ParserRuleContext {
|
|
|
5854
5858
|
ID() {
|
|
5855
5859
|
return this.getToken(CircuitScriptParser.ID, 0);
|
|
5856
5860
|
}
|
|
5861
|
+
data_expr() {
|
|
5862
|
+
return this.getRuleContext(0, Data_exprContext);
|
|
5863
|
+
}
|
|
5857
5864
|
get ruleIndex() {
|
|
5858
5865
|
return CircuitScriptParser.RULE_point_expr;
|
|
5859
5866
|
}
|
|
@@ -8,6 +8,7 @@ const builtInMethods = [
|
|
|
8
8
|
['len', objectLength],
|
|
9
9
|
['arrayPush', arrayPush],
|
|
10
10
|
['arrayGet', arrayGet],
|
|
11
|
+
['arraySet', arraySet],
|
|
11
12
|
['print', null],
|
|
12
13
|
];
|
|
13
14
|
export const buildInMethodNamesList = builtInMethods.map(item => item[0]);
|
|
@@ -106,6 +107,20 @@ function arrayGet(arrayObject, index) {
|
|
|
106
107
|
}
|
|
107
108
|
return arrayObject[useValue];
|
|
108
109
|
}
|
|
110
|
+
function arraySet(arrayObject, index, setValue) {
|
|
111
|
+
if (!Array.isArray(arrayObject)) {
|
|
112
|
+
throw "Invalid array object";
|
|
113
|
+
}
|
|
114
|
+
let useValue;
|
|
115
|
+
if (index instanceof NumericValue) {
|
|
116
|
+
useValue = index.toNumber();
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
useValue = index;
|
|
120
|
+
}
|
|
121
|
+
arrayObject[useValue] = setValue;
|
|
122
|
+
return arrayObject;
|
|
123
|
+
}
|
|
109
124
|
function getPositionParams(params) {
|
|
110
125
|
return params.map(([, , value]) => value);
|
|
111
126
|
}
|
package/dist/esm/draw_symbols.js
CHANGED
|
@@ -424,7 +424,8 @@ export class SymbolPlaceholder extends SymbolGraphic {
|
|
|
424
424
|
drawing.addArc(...positionParams);
|
|
425
425
|
break;
|
|
426
426
|
case PlaceHolderCommands.circle:
|
|
427
|
-
drawing.addArc(...positionParams, numeric(0), numeric(
|
|
427
|
+
drawing.addArc(...positionParams, numeric(0), numeric(180));
|
|
428
|
+
drawing.addArc(...positionParams, numeric(180), numeric(360));
|
|
428
429
|
break;
|
|
429
430
|
case PlaceHolderCommands.triangle:
|
|
430
431
|
drawing.addTriangle(...positionParams);
|
package/dist/esm/geometry.js
CHANGED
|
@@ -254,7 +254,6 @@ export class Geometry {
|
|
|
254
254
|
height: maxY - minY,
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
|
-
static FullCircleRadians = 2 * Math.PI;
|
|
258
257
|
static featuresToPath(items, flipX, flipY) {
|
|
259
258
|
const paths = [];
|
|
260
259
|
let isClosedPolygon = false;
|
|
@@ -267,17 +266,12 @@ export class Geometry {
|
|
|
267
266
|
const x = item.center.x;
|
|
268
267
|
const y = item.center.y;
|
|
269
268
|
const radius = item.r;
|
|
270
|
-
let useEndAngle = item.endAngle;
|
|
271
269
|
let extraEnd = '';
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
isClosedPolygon = true;
|
|
275
|
-
extraEnd = ' Z';
|
|
276
|
-
}
|
|
277
|
-
const startPoint = getArcPointRadians(x, y, radius, item.startAngle);
|
|
270
|
+
const { startAngle: useStartAngle, endAngle: useEndAngle } = item;
|
|
271
|
+
const startPoint = getArcPointRadians(x, y, radius, useStartAngle);
|
|
278
272
|
const endPoint = getArcPointRadians(x, y, radius, useEndAngle);
|
|
279
273
|
let largeArcSweepFlag = 0;
|
|
280
|
-
if (useEndAngle -
|
|
274
|
+
if (useEndAngle - useStartAngle > Math.PI) {
|
|
281
275
|
largeArcSweepFlag = 1;
|
|
282
276
|
}
|
|
283
277
|
let sweepFlag = 1;
|
|
@@ -154,6 +154,11 @@ export class SymbolValidatorVisitor extends BaseVisitor {
|
|
|
154
154
|
this.runExpressions(newExecutor, ctx.function_expr());
|
|
155
155
|
this.executionStack.pop();
|
|
156
156
|
};
|
|
157
|
+
visitFor_expr = (ctx) => {
|
|
158
|
+
ctx.ID().forEach(item => {
|
|
159
|
+
this.addSymbolVariable(item.getSymbol(), item.getText(), null);
|
|
160
|
+
});
|
|
161
|
+
};
|
|
157
162
|
getSymbols() {
|
|
158
163
|
return this.symbolTable;
|
|
159
164
|
}
|
package/dist/esm/visitor.js
CHANGED
|
@@ -17,13 +17,16 @@ export class ParserVisitor extends BaseVisitor {
|
|
|
17
17
|
};
|
|
18
18
|
visitPin_select_expr = (ctx) => {
|
|
19
19
|
let value = null;
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
23
|
-
value =
|
|
20
|
+
const ctxData = ctx.data_expr();
|
|
21
|
+
const result = this.visitResult(ctxData);
|
|
22
|
+
if (result instanceof NumericValue) {
|
|
23
|
+
value = result.toNumber();
|
|
24
24
|
}
|
|
25
|
-
else if (
|
|
26
|
-
value =
|
|
25
|
+
else if (typeof result === 'string') {
|
|
26
|
+
value = result;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
throw new RuntimeExecutionError("Invalid value for pin", ctx);
|
|
27
30
|
}
|
|
28
31
|
this.setResult(ctx, value);
|
|
29
32
|
};
|
|
@@ -927,7 +930,21 @@ export class ParserVisitor extends BaseVisitor {
|
|
|
927
930
|
};
|
|
928
931
|
visitPoint_expr = (ctx) => {
|
|
929
932
|
const ID = ctx.ID();
|
|
930
|
-
|
|
933
|
+
const ctxData = ctx.data_expr();
|
|
934
|
+
let pointValue;
|
|
935
|
+
if (ctxData) {
|
|
936
|
+
const resultValue = this.visitResult(ctxData);
|
|
937
|
+
if (typeof resultValue === 'string') {
|
|
938
|
+
pointValue = resultValue;
|
|
939
|
+
}
|
|
940
|
+
else {
|
|
941
|
+
throw new RuntimeExecutionError('Invalid value for point');
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
else if (ID) {
|
|
945
|
+
pointValue = ID.getText();
|
|
946
|
+
}
|
|
947
|
+
return this.getExecutor().addPoint(pointValue);
|
|
931
948
|
};
|
|
932
949
|
visitProperty_set_expr = (ctx) => {
|
|
933
950
|
const result = this.visitResult(ctx.data_expr());
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TerminalNode, Token } from "antlr4ng";
|
|
2
2
|
import { CircuitScriptLexer } from "./antlr/CircuitScriptLexer.js";
|
|
3
|
-
import { Function_def_exprContext, Create_component_exprContext, Create_graphic_exprContext, Atom_exprContext, Property_key_exprContext, ValueAtomExprContext, Assignment_exprContext, Import_exprContext, Function_args_exprContext, Function_call_exprContext, GraphicCommandExprContext } from "./antlr/CircuitScriptParser.js";
|
|
3
|
+
import { Function_def_exprContext, Create_component_exprContext, Create_graphic_exprContext, Atom_exprContext, Property_key_exprContext, ValueAtomExprContext, Assignment_exprContext, Import_exprContext, Function_args_exprContext, Function_call_exprContext, GraphicCommandExprContext, For_exprContext } from "./antlr/CircuitScriptParser.js";
|
|
4
4
|
import { BaseVisitor, OnErrorHandler } from "./BaseVisitor.js";
|
|
5
5
|
import { NodeScriptEnvironment } from "./environment.js";
|
|
6
6
|
export declare class SemanticTokensVisitor extends BaseVisitor {
|
|
@@ -20,6 +20,7 @@ export declare class SemanticTokensVisitor extends BaseVisitor {
|
|
|
20
20
|
visitAssignment_expr: (ctx: Assignment_exprContext) => void;
|
|
21
21
|
visitAtom_expr: (ctx: Atom_exprContext) => void;
|
|
22
22
|
visitImport_expr: (ctx: Import_exprContext) => void;
|
|
23
|
+
visitFor_expr: (ctx: For_exprContext) => void;
|
|
23
24
|
addSemanticToken(node: TerminalNode, modifiers: string[], tokenType?: string | null): void;
|
|
24
25
|
parseToken(node: TerminalNode, modifiers: string[], tokenType?: string | null): IParsedToken;
|
|
25
26
|
dumpTokens(): void;
|
|
@@ -307,8 +307,7 @@ export declare class Assignment_expr2Context extends antlr.ParserRuleContext {
|
|
|
307
307
|
export declare class Pin_select_exprContext extends antlr.ParserRuleContext {
|
|
308
308
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
309
309
|
Pin(): antlr.TerminalNode;
|
|
310
|
-
|
|
311
|
-
STRING_VALUE(): antlr.TerminalNode | null;
|
|
310
|
+
data_expr(): Data_exprContext;
|
|
312
311
|
get ruleIndex(): number;
|
|
313
312
|
accept<Result>(visitor: CircuitScriptVisitor<Result>): Result | null;
|
|
314
313
|
}
|
|
@@ -833,7 +832,8 @@ export declare class Array_exprContext extends antlr.ParserRuleContext {
|
|
|
833
832
|
export declare class Point_exprContext extends antlr.ParserRuleContext {
|
|
834
833
|
constructor(parent: antlr.ParserRuleContext | null, invokingState: number);
|
|
835
834
|
Point(): antlr.TerminalNode;
|
|
836
|
-
ID(): antlr.TerminalNode;
|
|
835
|
+
ID(): antlr.TerminalNode | null;
|
|
836
|
+
data_expr(): Data_exprContext | null;
|
|
837
837
|
get ruleIndex(): number;
|
|
838
838
|
accept<Result>(visitor: CircuitScriptVisitor<Result>): Result | null;
|
|
839
839
|
}
|
package/dist/types/geometry.d.ts
CHANGED