@optique/core 1.0.0-dev.498 → 1.0.0-dev.502

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.
@@ -412,6 +412,52 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
412
412
  * Creates a parser that combines eleven mutually exclusive parsers into one.
413
413
  * The resulting parser will try each of the provided parsers in order,
414
414
  * and return the result of the first successful parser.
415
+ * @template MA The mode of the first parser.
416
+ * @template MB The mode of the second parser.
417
+ * @template MC The mode of the third parser.
418
+ * @template MD The mode of the fourth parser.
419
+ * @template ME The mode of the fifth parser.
420
+ * @template MF The mode of the sixth parser.
421
+ * @template MG The mode of the seventh parser.
422
+ * @template MH The mode of the eighth parser.
423
+ * @template MI The mode of the ninth parser.
424
+ * @template MJ The mode of the tenth parser.
425
+ * @template MK The mode of the eleventh parser.
426
+ * @template TA The type of the value returned by the first parser.
427
+ * @template TB The type of the value returned by the second parser.
428
+ * @template TC The type of the value returned by the third parser.
429
+ * @template TD The type of the value returned by the fourth parser.
430
+ * @template TE The type of the value returned by the fifth parser.
431
+ * @template TF The type of the value returned by the sixth parser.
432
+ * @template TG The type of the value returned by the seventh parser.
433
+ * @template TH The type of the value returned by the eighth parser.
434
+ * @template TI The type of the value returned by the ninth parser.
435
+ * @template TJ The type of the value returned by the tenth parser.
436
+ * @template TK The type of the value returned by the eleventh parser.
437
+ * @template TStateA The type of the state used by the first parser.
438
+ * @template TStateB The type of the state used by the second parser.
439
+ * @template TStateC The type of the state used by the third parser.
440
+ * @template TStateD The type of the state used by the fourth parser.
441
+ * @template TStateE The type of the state used by the fifth parser.
442
+ * @template TStateF The type of the state used by the sixth parser.
443
+ * @template TStateG The type of the state used by the seventh parser.
444
+ * @template TStateH The type of the state used by the eighth parser.
445
+ * @template TStateI The type of the state used by the ninth parser.
446
+ * @template TStateJ The type of the state used by the tenth parser.
447
+ * @template TStateK The type of the state used by the eleventh parser.
448
+ * @param a The first {@link Parser} to try.
449
+ * @param b The second {@link Parser} to try.
450
+ * @param c The third {@link Parser} to try.
451
+ * @param d The fourth {@link Parser} to try.
452
+ * @param e The fifth {@link Parser} to try.
453
+ * @param f The sixth {@link Parser} to try.
454
+ * @param g The seventh {@link Parser} to try.
455
+ * @param h The eighth {@link Parser} to try.
456
+ * @param i The ninth {@link Parser} to try.
457
+ * @param j The tenth {@link Parser} to try.
458
+ * @param k The eleventh {@link Parser} to try.
459
+ * @return A {@link Parser} that tries to parse using the provided parsers
460
+ * in order, returning the result of the first successful parser.
415
461
  * @since 1.0.0
416
462
  */
417
463
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>]>;
@@ -419,6 +465,56 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
419
465
  * Creates a parser that combines twelve mutually exclusive parsers into one.
420
466
  * The resulting parser will try each of the provided parsers in order,
421
467
  * and return the result of the first successful parser.
468
+ * @template MA The mode of the first parser.
469
+ * @template MB The mode of the second parser.
470
+ * @template MC The mode of the third parser.
471
+ * @template MD The mode of the fourth parser.
472
+ * @template ME The mode of the fifth parser.
473
+ * @template MF The mode of the sixth parser.
474
+ * @template MG The mode of the seventh parser.
475
+ * @template MH The mode of the eighth parser.
476
+ * @template MI The mode of the ninth parser.
477
+ * @template MJ The mode of the tenth parser.
478
+ * @template MK The mode of the eleventh parser.
479
+ * @template ML The mode of the twelfth parser.
480
+ * @template TA The type of the value returned by the first parser.
481
+ * @template TB The type of the value returned by the second parser.
482
+ * @template TC The type of the value returned by the third parser.
483
+ * @template TD The type of the value returned by the fourth parser.
484
+ * @template TE The type of the value returned by the fifth parser.
485
+ * @template TF The type of the value returned by the sixth parser.
486
+ * @template TG The type of the value returned by the seventh parser.
487
+ * @template TH The type of the value returned by the eighth parser.
488
+ * @template TI The type of the value returned by the ninth parser.
489
+ * @template TJ The type of the value returned by the tenth parser.
490
+ * @template TK The type of the value returned by the eleventh parser.
491
+ * @template TL The type of the value returned by the twelfth parser.
492
+ * @template TStateA The type of the state used by the first parser.
493
+ * @template TStateB The type of the state used by the second parser.
494
+ * @template TStateC The type of the state used by the third parser.
495
+ * @template TStateD The type of the state used by the fourth parser.
496
+ * @template TStateE The type of the state used by the fifth parser.
497
+ * @template TStateF The type of the state used by the sixth parser.
498
+ * @template TStateG The type of the state used by the seventh parser.
499
+ * @template TStateH The type of the state used by the eighth parser.
500
+ * @template TStateI The type of the state used by the ninth parser.
501
+ * @template TStateJ The type of the state used by the tenth parser.
502
+ * @template TStateK The type of the state used by the eleventh parser.
503
+ * @template TStateL The type of the state used by the twelfth parser.
504
+ * @param a The first {@link Parser} to try.
505
+ * @param b The second {@link Parser} to try.
506
+ * @param c The third {@link Parser} to try.
507
+ * @param d The fourth {@link Parser} to try.
508
+ * @param e The fifth {@link Parser} to try.
509
+ * @param f The sixth {@link Parser} to try.
510
+ * @param g The seventh {@link Parser} to try.
511
+ * @param h The eighth {@link Parser} to try.
512
+ * @param i The ninth {@link Parser} to try.
513
+ * @param j The tenth {@link Parser} to try.
514
+ * @param k The eleventh {@link Parser} to try.
515
+ * @param l The twelfth {@link Parser} to try.
516
+ * @return A {@link Parser} that tries to parse using the provided parsers
517
+ * in order, returning the result of the first successful parser.
422
518
  * @since 1.0.0
423
519
  */
424
520
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, ML extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TL, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK, TStateL>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>, l: Parser<ML, TL, TStateL>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK, ML]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK | TL, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>] | [11, ParserResult<TStateL>]>;
@@ -426,6 +522,60 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
426
522
  * Creates a parser that combines thirteen mutually exclusive parsers into one.
427
523
  * The resulting parser will try each of the provided parsers in order,
428
524
  * and return the result of the first successful parser.
525
+ * @template MA The mode of the first parser.
526
+ * @template MB The mode of the second parser.
527
+ * @template MC The mode of the third parser.
528
+ * @template MD The mode of the fourth parser.
529
+ * @template ME The mode of the fifth parser.
530
+ * @template MF The mode of the sixth parser.
531
+ * @template MG The mode of the seventh parser.
532
+ * @template MH The mode of the eighth parser.
533
+ * @template MI The mode of the ninth parser.
534
+ * @template MJ The mode of the tenth parser.
535
+ * @template MK The mode of the eleventh parser.
536
+ * @template ML The mode of the twelfth parser.
537
+ * @template MM The mode of the thirteenth parser.
538
+ * @template TA The type of the value returned by the first parser.
539
+ * @template TB The type of the value returned by the second parser.
540
+ * @template TC The type of the value returned by the third parser.
541
+ * @template TD The type of the value returned by the fourth parser.
542
+ * @template TE The type of the value returned by the fifth parser.
543
+ * @template TF The type of the value returned by the sixth parser.
544
+ * @template TG The type of the value returned by the seventh parser.
545
+ * @template TH The type of the value returned by the eighth parser.
546
+ * @template TI The type of the value returned by the ninth parser.
547
+ * @template TJ The type of the value returned by the tenth parser.
548
+ * @template TK The type of the value returned by the eleventh parser.
549
+ * @template TL The type of the value returned by the twelfth parser.
550
+ * @template TM The type of the value returned by the thirteenth parser.
551
+ * @template TStateA The type of the state used by the first parser.
552
+ * @template TStateB The type of the state used by the second parser.
553
+ * @template TStateC The type of the state used by the third parser.
554
+ * @template TStateD The type of the state used by the fourth parser.
555
+ * @template TStateE The type of the state used by the fifth parser.
556
+ * @template TStateF The type of the state used by the sixth parser.
557
+ * @template TStateG The type of the state used by the seventh parser.
558
+ * @template TStateH The type of the state used by the eighth parser.
559
+ * @template TStateI The type of the state used by the ninth parser.
560
+ * @template TStateJ The type of the state used by the tenth parser.
561
+ * @template TStateK The type of the state used by the eleventh parser.
562
+ * @template TStateL The type of the state used by the twelfth parser.
563
+ * @template TStateM The type of the state used by the thirteenth parser.
564
+ * @param a The first {@link Parser} to try.
565
+ * @param b The second {@link Parser} to try.
566
+ * @param c The third {@link Parser} to try.
567
+ * @param d The fourth {@link Parser} to try.
568
+ * @param e The fifth {@link Parser} to try.
569
+ * @param f The sixth {@link Parser} to try.
570
+ * @param g The seventh {@link Parser} to try.
571
+ * @param h The eighth {@link Parser} to try.
572
+ * @param i The ninth {@link Parser} to try.
573
+ * @param j The tenth {@link Parser} to try.
574
+ * @param k The eleventh {@link Parser} to try.
575
+ * @param l The twelfth {@link Parser} to try.
576
+ * @param m The thirteenth {@link Parser} to try.
577
+ * @return A {@link Parser} that tries to parse using the provided parsers
578
+ * in order, returning the result of the first successful parser.
429
579
  * @since 1.0.0
430
580
  */
431
581
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, ML extends Mode, MM extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TL, TM, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK, TStateL, TStateM>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>, l: Parser<ML, TL, TStateL>, m: Parser<MM, TM, TStateM>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK, ML, MM]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK | TL | TM, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>] | [11, ParserResult<TStateL>] | [12, ParserResult<TStateM>]>;
@@ -433,6 +583,64 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
433
583
  * Creates a parser that combines fourteen mutually exclusive parsers into one.
434
584
  * The resulting parser will try each of the provided parsers in order,
435
585
  * and return the result of the first successful parser.
586
+ * @template MA The mode of the first parser.
587
+ * @template MB The mode of the second parser.
588
+ * @template MC The mode of the third parser.
589
+ * @template MD The mode of the fourth parser.
590
+ * @template ME The mode of the fifth parser.
591
+ * @template MF The mode of the sixth parser.
592
+ * @template MG The mode of the seventh parser.
593
+ * @template MH The mode of the eighth parser.
594
+ * @template MI The mode of the ninth parser.
595
+ * @template MJ The mode of the tenth parser.
596
+ * @template MK The mode of the eleventh parser.
597
+ * @template ML The mode of the twelfth parser.
598
+ * @template MM The mode of the thirteenth parser.
599
+ * @template MN The mode of the fourteenth parser.
600
+ * @template TA The type of the value returned by the first parser.
601
+ * @template TB The type of the value returned by the second parser.
602
+ * @template TC The type of the value returned by the third parser.
603
+ * @template TD The type of the value returned by the fourth parser.
604
+ * @template TE The type of the value returned by the fifth parser.
605
+ * @template TF The type of the value returned by the sixth parser.
606
+ * @template TG The type of the value returned by the seventh parser.
607
+ * @template TH The type of the value returned by the eighth parser.
608
+ * @template TI The type of the value returned by the ninth parser.
609
+ * @template TJ The type of the value returned by the tenth parser.
610
+ * @template TK The type of the value returned by the eleventh parser.
611
+ * @template TL The type of the value returned by the twelfth parser.
612
+ * @template TM The type of the value returned by the thirteenth parser.
613
+ * @template TN The type of the value returned by the fourteenth parser.
614
+ * @template TStateA The type of the state used by the first parser.
615
+ * @template TStateB The type of the state used by the second parser.
616
+ * @template TStateC The type of the state used by the third parser.
617
+ * @template TStateD The type of the state used by the fourth parser.
618
+ * @template TStateE The type of the state used by the fifth parser.
619
+ * @template TStateF The type of the state used by the sixth parser.
620
+ * @template TStateG The type of the state used by the seventh parser.
621
+ * @template TStateH The type of the state used by the eighth parser.
622
+ * @template TStateI The type of the state used by the ninth parser.
623
+ * @template TStateJ The type of the state used by the tenth parser.
624
+ * @template TStateK The type of the state used by the eleventh parser.
625
+ * @template TStateL The type of the state used by the twelfth parser.
626
+ * @template TStateM The type of the state used by the thirteenth parser.
627
+ * @template TStateN The type of the state used by the fourteenth parser.
628
+ * @param a The first {@link Parser} to try.
629
+ * @param b The second {@link Parser} to try.
630
+ * @param c The third {@link Parser} to try.
631
+ * @param d The fourth {@link Parser} to try.
632
+ * @param e The fifth {@link Parser} to try.
633
+ * @param f The sixth {@link Parser} to try.
634
+ * @param g The seventh {@link Parser} to try.
635
+ * @param h The eighth {@link Parser} to try.
636
+ * @param i The ninth {@link Parser} to try.
637
+ * @param j The tenth {@link Parser} to try.
638
+ * @param k The eleventh {@link Parser} to try.
639
+ * @param l The twelfth {@link Parser} to try.
640
+ * @param m The thirteenth {@link Parser} to try.
641
+ * @param n The fourteenth {@link Parser} to try.
642
+ * @return A {@link Parser} that tries to parse using the provided parsers
643
+ * in order, returning the result of the first successful parser.
436
644
  * @since 1.0.0
437
645
  */
438
646
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, ML extends Mode, MM extends Mode, MN extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TL, TM, TN, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK, TStateL, TStateM, TStateN>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>, l: Parser<ML, TL, TStateL>, m: Parser<MM, TM, TStateM>, n: Parser<MN, TN, TStateN>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK, ML, MM, MN]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK | TL | TM | TN, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>] | [11, ParserResult<TStateL>] | [12, ParserResult<TStateM>] | [13, ParserResult<TStateN>]>;
@@ -440,6 +648,68 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
440
648
  * Creates a parser that combines fifteen mutually exclusive parsers into one.
441
649
  * The resulting parser will try each of the provided parsers in order,
442
650
  * and return the result of the first successful parser.
651
+ * @template MA The mode of the first parser.
652
+ * @template MB The mode of the second parser.
653
+ * @template MC The mode of the third parser.
654
+ * @template MD The mode of the fourth parser.
655
+ * @template ME The mode of the fifth parser.
656
+ * @template MF The mode of the sixth parser.
657
+ * @template MG The mode of the seventh parser.
658
+ * @template MH The mode of the eighth parser.
659
+ * @template MI The mode of the ninth parser.
660
+ * @template MJ The mode of the tenth parser.
661
+ * @template MK The mode of the eleventh parser.
662
+ * @template ML The mode of the twelfth parser.
663
+ * @template MM The mode of the thirteenth parser.
664
+ * @template MN The mode of the fourteenth parser.
665
+ * @template MO The mode of the fifteenth parser.
666
+ * @template TA The type of the value returned by the first parser.
667
+ * @template TB The type of the value returned by the second parser.
668
+ * @template TC The type of the value returned by the third parser.
669
+ * @template TD The type of the value returned by the fourth parser.
670
+ * @template TE The type of the value returned by the fifth parser.
671
+ * @template TF The type of the value returned by the sixth parser.
672
+ * @template TG The type of the value returned by the seventh parser.
673
+ * @template TH The type of the value returned by the eighth parser.
674
+ * @template TI The type of the value returned by the ninth parser.
675
+ * @template TJ The type of the value returned by the tenth parser.
676
+ * @template TK The type of the value returned by the eleventh parser.
677
+ * @template TL The type of the value returned by the twelfth parser.
678
+ * @template TM The type of the value returned by the thirteenth parser.
679
+ * @template TN The type of the value returned by the fourteenth parser.
680
+ * @template TO The type of the value returned by the fifteenth parser.
681
+ * @template TStateA The type of the state used by the first parser.
682
+ * @template TStateB The type of the state used by the second parser.
683
+ * @template TStateC The type of the state used by the third parser.
684
+ * @template TStateD The type of the state used by the fourth parser.
685
+ * @template TStateE The type of the state used by the fifth parser.
686
+ * @template TStateF The type of the state used by the sixth parser.
687
+ * @template TStateG The type of the state used by the seventh parser.
688
+ * @template TStateH The type of the state used by the eighth parser.
689
+ * @template TStateI The type of the state used by the ninth parser.
690
+ * @template TStateJ The type of the state used by the tenth parser.
691
+ * @template TStateK The type of the state used by the eleventh parser.
692
+ * @template TStateL The type of the state used by the twelfth parser.
693
+ * @template TStateM The type of the state used by the thirteenth parser.
694
+ * @template TStateN The type of the state used by the fourteenth parser.
695
+ * @template TStateO The type of the state used by the fifteenth parser.
696
+ * @param a The first {@link Parser} to try.
697
+ * @param b The second {@link Parser} to try.
698
+ * @param c The third {@link Parser} to try.
699
+ * @param d The fourth {@link Parser} to try.
700
+ * @param e The fifth {@link Parser} to try.
701
+ * @param f The sixth {@link Parser} to try.
702
+ * @param g The seventh {@link Parser} to try.
703
+ * @param h The eighth {@link Parser} to try.
704
+ * @param i The ninth {@link Parser} to try.
705
+ * @param j The tenth {@link Parser} to try.
706
+ * @param k The eleventh {@link Parser} to try.
707
+ * @param l The twelfth {@link Parser} to try.
708
+ * @param m The thirteenth {@link Parser} to try.
709
+ * @param n The fourteenth {@link Parser} to try.
710
+ * @param o The fifteenth {@link Parser} to try.
711
+ * @return A {@link Parser} that tries to parse using the provided parsers
712
+ * in order, returning the result of the first successful parser.
443
713
  * @since 1.0.0
444
714
  */
445
715
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, ML extends Mode, MM extends Mode, MN extends Mode, MO extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TL, TM, TN, TO, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK, TStateL, TStateM, TStateN, TStateO>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>, l: Parser<ML, TL, TStateL>, m: Parser<MM, TM, TStateM>, n: Parser<MN, TN, TStateN>, o: Parser<MO, TO, TStateO>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK, ML, MM, MN, MO]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK | TL | TM | TN | TO, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>] | [11, ParserResult<TStateL>] | [12, ParserResult<TStateM>] | [13, ParserResult<TStateN>] | [14, ParserResult<TStateO>]>;
@@ -478,6 +748,12 @@ declare function or<TA extends Parser<Mode, unknown, unknown>, TB extends Parser
478
748
  * @since 0.5.0
479
749
  */
480
750
  declare function or<const TParsers extends readonly Parser<Mode, unknown, unknown>[]>(...rest: [...parsers: TParsers, options: OrTailOptions] & OrArityGuard<TParsers>): Parser<CombineModes<{ readonly [K in keyof TParsers]: ExtractMode<TParsers[K]> }>, InferValue<TParsers[number]>, undefined | [number, ParserResult<unknown>]>;
751
+ /**
752
+ * Creates a parser that tries each parser in sequence until one succeeds.
753
+ * @param parsers Parsers to try in order.
754
+ * @returns A parser that succeeds if any of the input parsers succeed.
755
+ * @since 0.5.0
756
+ */
481
757
  declare function or<const TParsers extends readonly Parser<Mode, unknown, unknown>[]>(...parsers: TParsers & OrArityGuard<TParsers>): Parser<CombineModes<{ readonly [K in keyof TParsers]: ExtractMode<TParsers[K]> }>, InferValue<TParsers[number]>, undefined | [number, ParserResult<unknown>]>;
482
758
  /**
483
759
  * Options for customizing error messages in the {@link longestMatch}
@@ -412,6 +412,52 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
412
412
  * Creates a parser that combines eleven mutually exclusive parsers into one.
413
413
  * The resulting parser will try each of the provided parsers in order,
414
414
  * and return the result of the first successful parser.
415
+ * @template MA The mode of the first parser.
416
+ * @template MB The mode of the second parser.
417
+ * @template MC The mode of the third parser.
418
+ * @template MD The mode of the fourth parser.
419
+ * @template ME The mode of the fifth parser.
420
+ * @template MF The mode of the sixth parser.
421
+ * @template MG The mode of the seventh parser.
422
+ * @template MH The mode of the eighth parser.
423
+ * @template MI The mode of the ninth parser.
424
+ * @template MJ The mode of the tenth parser.
425
+ * @template MK The mode of the eleventh parser.
426
+ * @template TA The type of the value returned by the first parser.
427
+ * @template TB The type of the value returned by the second parser.
428
+ * @template TC The type of the value returned by the third parser.
429
+ * @template TD The type of the value returned by the fourth parser.
430
+ * @template TE The type of the value returned by the fifth parser.
431
+ * @template TF The type of the value returned by the sixth parser.
432
+ * @template TG The type of the value returned by the seventh parser.
433
+ * @template TH The type of the value returned by the eighth parser.
434
+ * @template TI The type of the value returned by the ninth parser.
435
+ * @template TJ The type of the value returned by the tenth parser.
436
+ * @template TK The type of the value returned by the eleventh parser.
437
+ * @template TStateA The type of the state used by the first parser.
438
+ * @template TStateB The type of the state used by the second parser.
439
+ * @template TStateC The type of the state used by the third parser.
440
+ * @template TStateD The type of the state used by the fourth parser.
441
+ * @template TStateE The type of the state used by the fifth parser.
442
+ * @template TStateF The type of the state used by the sixth parser.
443
+ * @template TStateG The type of the state used by the seventh parser.
444
+ * @template TStateH The type of the state used by the eighth parser.
445
+ * @template TStateI The type of the state used by the ninth parser.
446
+ * @template TStateJ The type of the state used by the tenth parser.
447
+ * @template TStateK The type of the state used by the eleventh parser.
448
+ * @param a The first {@link Parser} to try.
449
+ * @param b The second {@link Parser} to try.
450
+ * @param c The third {@link Parser} to try.
451
+ * @param d The fourth {@link Parser} to try.
452
+ * @param e The fifth {@link Parser} to try.
453
+ * @param f The sixth {@link Parser} to try.
454
+ * @param g The seventh {@link Parser} to try.
455
+ * @param h The eighth {@link Parser} to try.
456
+ * @param i The ninth {@link Parser} to try.
457
+ * @param j The tenth {@link Parser} to try.
458
+ * @param k The eleventh {@link Parser} to try.
459
+ * @return A {@link Parser} that tries to parse using the provided parsers
460
+ * in order, returning the result of the first successful parser.
415
461
  * @since 1.0.0
416
462
  */
417
463
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>]>;
@@ -419,6 +465,56 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
419
465
  * Creates a parser that combines twelve mutually exclusive parsers into one.
420
466
  * The resulting parser will try each of the provided parsers in order,
421
467
  * and return the result of the first successful parser.
468
+ * @template MA The mode of the first parser.
469
+ * @template MB The mode of the second parser.
470
+ * @template MC The mode of the third parser.
471
+ * @template MD The mode of the fourth parser.
472
+ * @template ME The mode of the fifth parser.
473
+ * @template MF The mode of the sixth parser.
474
+ * @template MG The mode of the seventh parser.
475
+ * @template MH The mode of the eighth parser.
476
+ * @template MI The mode of the ninth parser.
477
+ * @template MJ The mode of the tenth parser.
478
+ * @template MK The mode of the eleventh parser.
479
+ * @template ML The mode of the twelfth parser.
480
+ * @template TA The type of the value returned by the first parser.
481
+ * @template TB The type of the value returned by the second parser.
482
+ * @template TC The type of the value returned by the third parser.
483
+ * @template TD The type of the value returned by the fourth parser.
484
+ * @template TE The type of the value returned by the fifth parser.
485
+ * @template TF The type of the value returned by the sixth parser.
486
+ * @template TG The type of the value returned by the seventh parser.
487
+ * @template TH The type of the value returned by the eighth parser.
488
+ * @template TI The type of the value returned by the ninth parser.
489
+ * @template TJ The type of the value returned by the tenth parser.
490
+ * @template TK The type of the value returned by the eleventh parser.
491
+ * @template TL The type of the value returned by the twelfth parser.
492
+ * @template TStateA The type of the state used by the first parser.
493
+ * @template TStateB The type of the state used by the second parser.
494
+ * @template TStateC The type of the state used by the third parser.
495
+ * @template TStateD The type of the state used by the fourth parser.
496
+ * @template TStateE The type of the state used by the fifth parser.
497
+ * @template TStateF The type of the state used by the sixth parser.
498
+ * @template TStateG The type of the state used by the seventh parser.
499
+ * @template TStateH The type of the state used by the eighth parser.
500
+ * @template TStateI The type of the state used by the ninth parser.
501
+ * @template TStateJ The type of the state used by the tenth parser.
502
+ * @template TStateK The type of the state used by the eleventh parser.
503
+ * @template TStateL The type of the state used by the twelfth parser.
504
+ * @param a The first {@link Parser} to try.
505
+ * @param b The second {@link Parser} to try.
506
+ * @param c The third {@link Parser} to try.
507
+ * @param d The fourth {@link Parser} to try.
508
+ * @param e The fifth {@link Parser} to try.
509
+ * @param f The sixth {@link Parser} to try.
510
+ * @param g The seventh {@link Parser} to try.
511
+ * @param h The eighth {@link Parser} to try.
512
+ * @param i The ninth {@link Parser} to try.
513
+ * @param j The tenth {@link Parser} to try.
514
+ * @param k The eleventh {@link Parser} to try.
515
+ * @param l The twelfth {@link Parser} to try.
516
+ * @return A {@link Parser} that tries to parse using the provided parsers
517
+ * in order, returning the result of the first successful parser.
422
518
  * @since 1.0.0
423
519
  */
424
520
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, ML extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TL, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK, TStateL>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>, l: Parser<ML, TL, TStateL>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK, ML]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK | TL, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>] | [11, ParserResult<TStateL>]>;
@@ -426,6 +522,60 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
426
522
  * Creates a parser that combines thirteen mutually exclusive parsers into one.
427
523
  * The resulting parser will try each of the provided parsers in order,
428
524
  * and return the result of the first successful parser.
525
+ * @template MA The mode of the first parser.
526
+ * @template MB The mode of the second parser.
527
+ * @template MC The mode of the third parser.
528
+ * @template MD The mode of the fourth parser.
529
+ * @template ME The mode of the fifth parser.
530
+ * @template MF The mode of the sixth parser.
531
+ * @template MG The mode of the seventh parser.
532
+ * @template MH The mode of the eighth parser.
533
+ * @template MI The mode of the ninth parser.
534
+ * @template MJ The mode of the tenth parser.
535
+ * @template MK The mode of the eleventh parser.
536
+ * @template ML The mode of the twelfth parser.
537
+ * @template MM The mode of the thirteenth parser.
538
+ * @template TA The type of the value returned by the first parser.
539
+ * @template TB The type of the value returned by the second parser.
540
+ * @template TC The type of the value returned by the third parser.
541
+ * @template TD The type of the value returned by the fourth parser.
542
+ * @template TE The type of the value returned by the fifth parser.
543
+ * @template TF The type of the value returned by the sixth parser.
544
+ * @template TG The type of the value returned by the seventh parser.
545
+ * @template TH The type of the value returned by the eighth parser.
546
+ * @template TI The type of the value returned by the ninth parser.
547
+ * @template TJ The type of the value returned by the tenth parser.
548
+ * @template TK The type of the value returned by the eleventh parser.
549
+ * @template TL The type of the value returned by the twelfth parser.
550
+ * @template TM The type of the value returned by the thirteenth parser.
551
+ * @template TStateA The type of the state used by the first parser.
552
+ * @template TStateB The type of the state used by the second parser.
553
+ * @template TStateC The type of the state used by the third parser.
554
+ * @template TStateD The type of the state used by the fourth parser.
555
+ * @template TStateE The type of the state used by the fifth parser.
556
+ * @template TStateF The type of the state used by the sixth parser.
557
+ * @template TStateG The type of the state used by the seventh parser.
558
+ * @template TStateH The type of the state used by the eighth parser.
559
+ * @template TStateI The type of the state used by the ninth parser.
560
+ * @template TStateJ The type of the state used by the tenth parser.
561
+ * @template TStateK The type of the state used by the eleventh parser.
562
+ * @template TStateL The type of the state used by the twelfth parser.
563
+ * @template TStateM The type of the state used by the thirteenth parser.
564
+ * @param a The first {@link Parser} to try.
565
+ * @param b The second {@link Parser} to try.
566
+ * @param c The third {@link Parser} to try.
567
+ * @param d The fourth {@link Parser} to try.
568
+ * @param e The fifth {@link Parser} to try.
569
+ * @param f The sixth {@link Parser} to try.
570
+ * @param g The seventh {@link Parser} to try.
571
+ * @param h The eighth {@link Parser} to try.
572
+ * @param i The ninth {@link Parser} to try.
573
+ * @param j The tenth {@link Parser} to try.
574
+ * @param k The eleventh {@link Parser} to try.
575
+ * @param l The twelfth {@link Parser} to try.
576
+ * @param m The thirteenth {@link Parser} to try.
577
+ * @return A {@link Parser} that tries to parse using the provided parsers
578
+ * in order, returning the result of the first successful parser.
429
579
  * @since 1.0.0
430
580
  */
431
581
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, ML extends Mode, MM extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TL, TM, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK, TStateL, TStateM>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>, l: Parser<ML, TL, TStateL>, m: Parser<MM, TM, TStateM>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK, ML, MM]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK | TL | TM, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>] | [11, ParserResult<TStateL>] | [12, ParserResult<TStateM>]>;
@@ -433,6 +583,64 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
433
583
  * Creates a parser that combines fourteen mutually exclusive parsers into one.
434
584
  * The resulting parser will try each of the provided parsers in order,
435
585
  * and return the result of the first successful parser.
586
+ * @template MA The mode of the first parser.
587
+ * @template MB The mode of the second parser.
588
+ * @template MC The mode of the third parser.
589
+ * @template MD The mode of the fourth parser.
590
+ * @template ME The mode of the fifth parser.
591
+ * @template MF The mode of the sixth parser.
592
+ * @template MG The mode of the seventh parser.
593
+ * @template MH The mode of the eighth parser.
594
+ * @template MI The mode of the ninth parser.
595
+ * @template MJ The mode of the tenth parser.
596
+ * @template MK The mode of the eleventh parser.
597
+ * @template ML The mode of the twelfth parser.
598
+ * @template MM The mode of the thirteenth parser.
599
+ * @template MN The mode of the fourteenth parser.
600
+ * @template TA The type of the value returned by the first parser.
601
+ * @template TB The type of the value returned by the second parser.
602
+ * @template TC The type of the value returned by the third parser.
603
+ * @template TD The type of the value returned by the fourth parser.
604
+ * @template TE The type of the value returned by the fifth parser.
605
+ * @template TF The type of the value returned by the sixth parser.
606
+ * @template TG The type of the value returned by the seventh parser.
607
+ * @template TH The type of the value returned by the eighth parser.
608
+ * @template TI The type of the value returned by the ninth parser.
609
+ * @template TJ The type of the value returned by the tenth parser.
610
+ * @template TK The type of the value returned by the eleventh parser.
611
+ * @template TL The type of the value returned by the twelfth parser.
612
+ * @template TM The type of the value returned by the thirteenth parser.
613
+ * @template TN The type of the value returned by the fourteenth parser.
614
+ * @template TStateA The type of the state used by the first parser.
615
+ * @template TStateB The type of the state used by the second parser.
616
+ * @template TStateC The type of the state used by the third parser.
617
+ * @template TStateD The type of the state used by the fourth parser.
618
+ * @template TStateE The type of the state used by the fifth parser.
619
+ * @template TStateF The type of the state used by the sixth parser.
620
+ * @template TStateG The type of the state used by the seventh parser.
621
+ * @template TStateH The type of the state used by the eighth parser.
622
+ * @template TStateI The type of the state used by the ninth parser.
623
+ * @template TStateJ The type of the state used by the tenth parser.
624
+ * @template TStateK The type of the state used by the eleventh parser.
625
+ * @template TStateL The type of the state used by the twelfth parser.
626
+ * @template TStateM The type of the state used by the thirteenth parser.
627
+ * @template TStateN The type of the state used by the fourteenth parser.
628
+ * @param a The first {@link Parser} to try.
629
+ * @param b The second {@link Parser} to try.
630
+ * @param c The third {@link Parser} to try.
631
+ * @param d The fourth {@link Parser} to try.
632
+ * @param e The fifth {@link Parser} to try.
633
+ * @param f The sixth {@link Parser} to try.
634
+ * @param g The seventh {@link Parser} to try.
635
+ * @param h The eighth {@link Parser} to try.
636
+ * @param i The ninth {@link Parser} to try.
637
+ * @param j The tenth {@link Parser} to try.
638
+ * @param k The eleventh {@link Parser} to try.
639
+ * @param l The twelfth {@link Parser} to try.
640
+ * @param m The thirteenth {@link Parser} to try.
641
+ * @param n The fourteenth {@link Parser} to try.
642
+ * @return A {@link Parser} that tries to parse using the provided parsers
643
+ * in order, returning the result of the first successful parser.
436
644
  * @since 1.0.0
437
645
  */
438
646
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, ML extends Mode, MM extends Mode, MN extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TL, TM, TN, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK, TStateL, TStateM, TStateN>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>, l: Parser<ML, TL, TStateL>, m: Parser<MM, TM, TStateM>, n: Parser<MN, TN, TStateN>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK, ML, MM, MN]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK | TL | TM | TN, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>] | [11, ParserResult<TStateL>] | [12, ParserResult<TStateM>] | [13, ParserResult<TStateN>]>;
@@ -440,6 +648,68 @@ declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extend
440
648
  * Creates a parser that combines fifteen mutually exclusive parsers into one.
441
649
  * The resulting parser will try each of the provided parsers in order,
442
650
  * and return the result of the first successful parser.
651
+ * @template MA The mode of the first parser.
652
+ * @template MB The mode of the second parser.
653
+ * @template MC The mode of the third parser.
654
+ * @template MD The mode of the fourth parser.
655
+ * @template ME The mode of the fifth parser.
656
+ * @template MF The mode of the sixth parser.
657
+ * @template MG The mode of the seventh parser.
658
+ * @template MH The mode of the eighth parser.
659
+ * @template MI The mode of the ninth parser.
660
+ * @template MJ The mode of the tenth parser.
661
+ * @template MK The mode of the eleventh parser.
662
+ * @template ML The mode of the twelfth parser.
663
+ * @template MM The mode of the thirteenth parser.
664
+ * @template MN The mode of the fourteenth parser.
665
+ * @template MO The mode of the fifteenth parser.
666
+ * @template TA The type of the value returned by the first parser.
667
+ * @template TB The type of the value returned by the second parser.
668
+ * @template TC The type of the value returned by the third parser.
669
+ * @template TD The type of the value returned by the fourth parser.
670
+ * @template TE The type of the value returned by the fifth parser.
671
+ * @template TF The type of the value returned by the sixth parser.
672
+ * @template TG The type of the value returned by the seventh parser.
673
+ * @template TH The type of the value returned by the eighth parser.
674
+ * @template TI The type of the value returned by the ninth parser.
675
+ * @template TJ The type of the value returned by the tenth parser.
676
+ * @template TK The type of the value returned by the eleventh parser.
677
+ * @template TL The type of the value returned by the twelfth parser.
678
+ * @template TM The type of the value returned by the thirteenth parser.
679
+ * @template TN The type of the value returned by the fourteenth parser.
680
+ * @template TO The type of the value returned by the fifteenth parser.
681
+ * @template TStateA The type of the state used by the first parser.
682
+ * @template TStateB The type of the state used by the second parser.
683
+ * @template TStateC The type of the state used by the third parser.
684
+ * @template TStateD The type of the state used by the fourth parser.
685
+ * @template TStateE The type of the state used by the fifth parser.
686
+ * @template TStateF The type of the state used by the sixth parser.
687
+ * @template TStateG The type of the state used by the seventh parser.
688
+ * @template TStateH The type of the state used by the eighth parser.
689
+ * @template TStateI The type of the state used by the ninth parser.
690
+ * @template TStateJ The type of the state used by the tenth parser.
691
+ * @template TStateK The type of the state used by the eleventh parser.
692
+ * @template TStateL The type of the state used by the twelfth parser.
693
+ * @template TStateM The type of the state used by the thirteenth parser.
694
+ * @template TStateN The type of the state used by the fourteenth parser.
695
+ * @template TStateO The type of the state used by the fifteenth parser.
696
+ * @param a The first {@link Parser} to try.
697
+ * @param b The second {@link Parser} to try.
698
+ * @param c The third {@link Parser} to try.
699
+ * @param d The fourth {@link Parser} to try.
700
+ * @param e The fifth {@link Parser} to try.
701
+ * @param f The sixth {@link Parser} to try.
702
+ * @param g The seventh {@link Parser} to try.
703
+ * @param h The eighth {@link Parser} to try.
704
+ * @param i The ninth {@link Parser} to try.
705
+ * @param j The tenth {@link Parser} to try.
706
+ * @param k The eleventh {@link Parser} to try.
707
+ * @param l The twelfth {@link Parser} to try.
708
+ * @param m The thirteenth {@link Parser} to try.
709
+ * @param n The fourteenth {@link Parser} to try.
710
+ * @param o The fifteenth {@link Parser} to try.
711
+ * @return A {@link Parser} that tries to parse using the provided parsers
712
+ * in order, returning the result of the first successful parser.
443
713
  * @since 1.0.0
444
714
  */
445
715
  declare function or<MA extends Mode, MB extends Mode, MC extends Mode, MD extends Mode, ME extends Mode, MF extends Mode, MG extends Mode, MH extends Mode, MI extends Mode, MJ extends Mode, MK extends Mode, ML extends Mode, MM extends Mode, MN extends Mode, MO extends Mode, TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TK, TL, TM, TN, TO, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ, TStateK, TStateL, TStateM, TStateN, TStateO>(a: Parser<MA, TA, TStateA>, b: Parser<MB, TB, TStateB>, c: Parser<MC, TC, TStateC>, d: Parser<MD, TD, TStateD>, e: Parser<ME, TE, TStateE>, f: Parser<MF, TF, TStateF>, g: Parser<MG, TG, TStateG>, h: Parser<MH, TH, TStateH>, i: Parser<MI, TI, TStateI>, j: Parser<MJ, TJ, TStateJ>, k: Parser<MK, TK, TStateK>, l: Parser<ML, TL, TStateL>, m: Parser<MM, TM, TStateM>, n: Parser<MN, TN, TStateN>, o: Parser<MO, TO, TStateO>): Parser<CombineModes<readonly [MA, MB, MC, MD, ME, MF, MG, MH, MI, MJ, MK, ML, MM, MN, MO]>, TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ | TK | TL | TM | TN | TO, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>] | [7, ParserResult<TStateH>] | [8, ParserResult<TStateI>] | [9, ParserResult<TStateJ>] | [10, ParserResult<TStateK>] | [11, ParserResult<TStateL>] | [12, ParserResult<TStateM>] | [13, ParserResult<TStateN>] | [14, ParserResult<TStateO>]>;
@@ -478,6 +748,12 @@ declare function or<TA extends Parser<Mode, unknown, unknown>, TB extends Parser
478
748
  * @since 0.5.0
479
749
  */
480
750
  declare function or<const TParsers extends readonly Parser<Mode, unknown, unknown>[]>(...rest: [...parsers: TParsers, options: OrTailOptions] & OrArityGuard<TParsers>): Parser<CombineModes<{ readonly [K in keyof TParsers]: ExtractMode<TParsers[K]> }>, InferValue<TParsers[number]>, undefined | [number, ParserResult<unknown>]>;
751
+ /**
752
+ * Creates a parser that tries each parser in sequence until one succeeds.
753
+ * @param parsers Parsers to try in order.
754
+ * @returns A parser that succeeds if any of the input parsers succeed.
755
+ * @since 0.5.0
756
+ */
481
757
  declare function or<const TParsers extends readonly Parser<Mode, unknown, unknown>[]>(...parsers: TParsers & OrArityGuard<TParsers>): Parser<CombineModes<{ readonly [K in keyof TParsers]: ExtractMode<TParsers[K]> }>, InferValue<TParsers[number]>, undefined | [number, ParserResult<unknown>]>;
482
758
  /**
483
759
  * Options for customizing error messages in the {@link longestMatch}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "1.0.0-dev.498+913c3deb",
3
+ "version": "1.0.0-dev.502+f064dfb8",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",