@optique/core 0.2.0 → 0.3.0-dev.34

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/parser.d.cts CHANGED
@@ -434,6 +434,166 @@ declare function or<TA, TB, TC, TD, TStateA, TStateB, TStateC, TStateD>(a: Parse
434
434
  * in order, returning the result of the first successful parser.
435
435
  */
436
436
  declare function or<TA, TB, TC, TD, TE, TStateA, TStateB, TStateC, TStateD, TStateE>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>): Parser<TA | TB | TC | TD | TE, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>]>;
437
+ /**
438
+ * Creates a parser that combines six mutually exclusive parsers into one.
439
+ * The resulting parser will try each of the provided parsers in order,
440
+ * and return the result of the first successful parser.
441
+ * @template TA The type of the value returned by the first parser.
442
+ * @template TB The type of the value returned by the second parser.
443
+ * @template TC The type of the value returned by the third parser.
444
+ * @template TD The type of the value returned by the fourth parser.
445
+ * @template TE The type of the value returned by the fifth parser.
446
+ * @template TF The type of the value returned by the sixth parser.
447
+ * @template TStateA The type of the state used by the first parser.
448
+ * @template TStateB The type of the state used by the second parser.
449
+ * @template TStateC The type of the state used by the third parser.
450
+ * @template TStateD The type of the state used by the fourth parser.
451
+ * @template TStateE The type of the state used by the fifth parser.
452
+ * @template TStateF The type of the state used by the sixth parser.
453
+ * @param a The first {@link Parser} to try.
454
+ * @param b The second {@link Parser} to try.
455
+ * @param c The third {@link Parser} to try.
456
+ * @param d The fourth {@link Parser} to try.
457
+ * @param e The fifth {@link Parser} to try.
458
+ * @param f The sixth {@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.
461
+ */
462
+ declare function or<TA, TB, TC, TD, TE, TF, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>): Parser<TA | TB | TC | TD | TE | TF, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>]>;
463
+ /**
464
+ * Creates a parser that combines seven mutually exclusive parsers into one.
465
+ * The resulting parser will try each of the provided parsers in order,
466
+ * and return the result of the first successful parser.
467
+ * @template TA The type of the value returned by the first parser.
468
+ * @template TB The type of the value returned by the second parser.
469
+ * @template TC The type of the value returned by the third parser.
470
+ * @template TD The type of the value returned by the fourth parser.
471
+ * @template TE The type of the value returned by the fifth parser.
472
+ * @template TF The type of the value returned by the sixth parser.
473
+ * @template TG The type of the value returned by the seventh parser.
474
+ * @template TStateA The type of the state used by the first parser.
475
+ * @template TStateB The type of the state used by the second parser.
476
+ * @template TStateC The type of the state used by the third parser.
477
+ * @template TStateD The type of the state used by the fourth parser.
478
+ * @template TStateE The type of the state used by the fifth parser.
479
+ * @template TStateF The type of the state used by the sixth parser.
480
+ * @template TStateG The type of the state used by the seventh parser.
481
+ * @param a The first {@link Parser} to try.
482
+ * @param b The second {@link Parser} to try.
483
+ * @param c The third {@link Parser} to try.
484
+ * @param d The fourth {@link Parser} to try.
485
+ * @param e The fifth {@link Parser} to try.
486
+ * @param f The sixth {@link Parser} to try.
487
+ * @param g The seventh {@link Parser} to try.
488
+ * @return A {@link Parser} that tries to parse using the provided parsers
489
+ * in order, returning the result of the first successful parser.
490
+ */
491
+ declare function or<TA, TB, TC, TD, TE, TF, TG, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>, g: Parser<TG, TStateG>): Parser<TA | TB | TC | TD | TE | TF | TG, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>]>;
492
+ /**
493
+ * Creates a parser that combines eight mutually exclusive parsers into one.
494
+ * The resulting parser will try each of the provided parsers in order,
495
+ * and return the result of the first successful parser.
496
+ * @template TA The type of the value returned by the first parser.
497
+ * @template TB The type of the value returned by the second parser.
498
+ * @template TC The type of the value returned by the third parser.
499
+ * @template TD The type of the value returned by the fourth parser.
500
+ * @template TE The type of the value returned by the fifth parser.
501
+ * @template TF The type of the value returned by the sixth parser.
502
+ * @template TG The type of the value returned by the seventh parser.
503
+ * @template TH The type of the value returned by the eighth parser.
504
+ * @template TStateA The type of the state used by the first parser.
505
+ * @template TStateB The type of the state used by the second parser.
506
+ * @template TStateC The type of the state used by the third parser.
507
+ * @template TStateD The type of the state used by the fourth parser.
508
+ * @template TStateE The type of the state used by the fifth parser.
509
+ * @template TStateF The type of the state used by the sixth parser.
510
+ * @template TStateG The type of the state used by the seventh parser.
511
+ * @template TStateH The type of the state used by the eighth parser.
512
+ * @param a The first {@link Parser} to try.
513
+ * @param b The second {@link Parser} to try.
514
+ * @param c The third {@link Parser} to try.
515
+ * @param d The fourth {@link Parser} to try.
516
+ * @param e The fifth {@link Parser} to try.
517
+ * @param f The sixth {@link Parser} to try.
518
+ * @param g The seventh {@link Parser} to try.
519
+ * @param h The eighth {@link Parser} to try.
520
+ * @return A {@link Parser} that tries to parse using the provided parsers
521
+ * in order, returning the result of the first successful parser.
522
+ */
523
+ declare function or<TA, TB, TC, TD, TE, TF, TG, TH, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>, g: Parser<TG, TStateG>, h: Parser<TH, TStateH>): Parser<TA | TB | TC | TD | TE | TF | TG | TH, 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>]>;
524
+ /**
525
+ * Creates a parser that combines nine mutually exclusive parsers into one.
526
+ * The resulting parser will try each of the provided parsers in order,
527
+ * and return the result of the first successful parser.
528
+ * @template TA The type of the value returned by the first parser.
529
+ * @template TB The type of the value returned by the second parser.
530
+ * @template TC The type of the value returned by the third parser.
531
+ * @template TD The type of the value returned by the fourth parser.
532
+ * @template TE The type of the value returned by the fifth parser.
533
+ * @template TF The type of the value returned by the sixth parser.
534
+ * @template TG The type of the value returned by the seventh parser.
535
+ * @template TH The type of the value returned by the eighth parser.
536
+ * @template TI The type of the value returned by the ninth parser.
537
+ * @template TStateA The type of the state used by the first parser.
538
+ * @template TStateB The type of the state used by the second parser.
539
+ * @template TStateC The type of the state used by the third parser.
540
+ * @template TStateD The type of the state used by the fourth parser.
541
+ * @template TStateE The type of the state used by the fifth parser.
542
+ * @template TStateF The type of the state used by the sixth parser.
543
+ * @template TStateG The type of the state used by the seventh parser.
544
+ * @template TStateH The type of the state used by the eighth parser.
545
+ * @template TStateI The type of the state used by the ninth parser.
546
+ * @param a The first {@link Parser} to try.
547
+ * @param b The second {@link Parser} to try.
548
+ * @param c The third {@link Parser} to try.
549
+ * @param d The fourth {@link Parser} to try.
550
+ * @param e The fifth {@link Parser} to try.
551
+ * @param f The sixth {@link Parser} to try.
552
+ * @param g The seventh {@link Parser} to try.
553
+ * @param h The eighth {@link Parser} to try.
554
+ * @param i The ninth {@link Parser} to try.
555
+ * @return A {@link Parser} that tries to parse using the provided parsers
556
+ * in order, returning the result of the first successful parser.
557
+ */
558
+ declare function or<TA, TB, TC, TD, TE, TF, TG, TH, TI, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>, g: Parser<TG, TStateG>, h: Parser<TH, TStateH>, i: Parser<TI, TStateI>): Parser<TA | TB | TC | TD | TE | TF | TG | TH | TI, 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>]>;
559
+ /**
560
+ * Creates a parser that combines ten mutually exclusive parsers into one.
561
+ * The resulting parser will try each of the provided parsers in order,
562
+ * and return the result of the first successful parser.
563
+ * @template TA The type of the value returned by the first parser.
564
+ * @template TB The type of the value returned by the second parser.
565
+ * @template TC The type of the value returned by the third parser.
566
+ * @template TD The type of the value returned by the fourth parser.
567
+ * @template TE The type of the value returned by the fifth parser.
568
+ * @template TF The type of the value returned by the sixth parser.
569
+ * @template TG The type of the value returned by the seventh parser.
570
+ * @template TH The type of the value returned by the eighth parser.
571
+ * @template TI The type of the value returned by the ninth parser.
572
+ * @template TJ The type of the value returned by the tenth parser.
573
+ * @template TStateA The type of the state used by the first parser.
574
+ * @template TStateB The type of the state used by the second parser.
575
+ * @template TStateC The type of the state used by the third parser.
576
+ * @template TStateD The type of the state used by the fourth parser.
577
+ * @template TStateE The type of the state used by the fifth parser.
578
+ * @template TStateF The type of the state used by the sixth parser.
579
+ * @template TStateG The type of the state used by the seventh parser.
580
+ * @template TStateH The type of the state used by the eighth parser.
581
+ * @template TStateI The type of the state used by the ninth parser.
582
+ * @template TStateJ The type of the state used by the tenth parser.
583
+ * @param a The first {@link Parser} to try.
584
+ * @param b The second {@link Parser} to try.
585
+ * @param c The third {@link Parser} to try.
586
+ * @param d The fourth {@link Parser} to try.
587
+ * @param e The fifth {@link Parser} to try.
588
+ * @param f The sixth {@link Parser} to try.
589
+ * @param g The seventh {@link Parser} to try.
590
+ * @param h The eighth {@link Parser} to try.
591
+ * @param i The ninth {@link Parser} to try.
592
+ * @param j The tenth {@link Parser} to try.
593
+ * @return A {@link Parser} that tries to parse using the provided parsers
594
+ * in order, returning the result of the first successful parser.
595
+ */
596
+ declare function or<TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>, g: Parser<TG, TStateG>, h: Parser<TH, TStateH>, i: Parser<TI, TStateI>, j: Parser<TJ, TStateJ>): Parser<TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ, 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>]>;
437
597
  /**
438
598
  * Merges multiple {@link object} parsers into a single {@link object} parser.
439
599
  * It is useful for combining multiple {@link object} parsers so that
package/dist/parser.d.ts CHANGED
@@ -434,6 +434,166 @@ declare function or<TA, TB, TC, TD, TStateA, TStateB, TStateC, TStateD>(a: Parse
434
434
  * in order, returning the result of the first successful parser.
435
435
  */
436
436
  declare function or<TA, TB, TC, TD, TE, TStateA, TStateB, TStateC, TStateD, TStateE>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>): Parser<TA | TB | TC | TD | TE, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>]>;
437
+ /**
438
+ * Creates a parser that combines six mutually exclusive parsers into one.
439
+ * The resulting parser will try each of the provided parsers in order,
440
+ * and return the result of the first successful parser.
441
+ * @template TA The type of the value returned by the first parser.
442
+ * @template TB The type of the value returned by the second parser.
443
+ * @template TC The type of the value returned by the third parser.
444
+ * @template TD The type of the value returned by the fourth parser.
445
+ * @template TE The type of the value returned by the fifth parser.
446
+ * @template TF The type of the value returned by the sixth parser.
447
+ * @template TStateA The type of the state used by the first parser.
448
+ * @template TStateB The type of the state used by the second parser.
449
+ * @template TStateC The type of the state used by the third parser.
450
+ * @template TStateD The type of the state used by the fourth parser.
451
+ * @template TStateE The type of the state used by the fifth parser.
452
+ * @template TStateF The type of the state used by the sixth parser.
453
+ * @param a The first {@link Parser} to try.
454
+ * @param b The second {@link Parser} to try.
455
+ * @param c The third {@link Parser} to try.
456
+ * @param d The fourth {@link Parser} to try.
457
+ * @param e The fifth {@link Parser} to try.
458
+ * @param f The sixth {@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.
461
+ */
462
+ declare function or<TA, TB, TC, TD, TE, TF, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>): Parser<TA | TB | TC | TD | TE | TF, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>]>;
463
+ /**
464
+ * Creates a parser that combines seven mutually exclusive parsers into one.
465
+ * The resulting parser will try each of the provided parsers in order,
466
+ * and return the result of the first successful parser.
467
+ * @template TA The type of the value returned by the first parser.
468
+ * @template TB The type of the value returned by the second parser.
469
+ * @template TC The type of the value returned by the third parser.
470
+ * @template TD The type of the value returned by the fourth parser.
471
+ * @template TE The type of the value returned by the fifth parser.
472
+ * @template TF The type of the value returned by the sixth parser.
473
+ * @template TG The type of the value returned by the seventh parser.
474
+ * @template TStateA The type of the state used by the first parser.
475
+ * @template TStateB The type of the state used by the second parser.
476
+ * @template TStateC The type of the state used by the third parser.
477
+ * @template TStateD The type of the state used by the fourth parser.
478
+ * @template TStateE The type of the state used by the fifth parser.
479
+ * @template TStateF The type of the state used by the sixth parser.
480
+ * @template TStateG The type of the state used by the seventh parser.
481
+ * @param a The first {@link Parser} to try.
482
+ * @param b The second {@link Parser} to try.
483
+ * @param c The third {@link Parser} to try.
484
+ * @param d The fourth {@link Parser} to try.
485
+ * @param e The fifth {@link Parser} to try.
486
+ * @param f The sixth {@link Parser} to try.
487
+ * @param g The seventh {@link Parser} to try.
488
+ * @return A {@link Parser} that tries to parse using the provided parsers
489
+ * in order, returning the result of the first successful parser.
490
+ */
491
+ declare function or<TA, TB, TC, TD, TE, TF, TG, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>, g: Parser<TG, TStateG>): Parser<TA | TB | TC | TD | TE | TF | TG, undefined | [0, ParserResult<TStateA>] | [1, ParserResult<TStateB>] | [2, ParserResult<TStateC>] | [3, ParserResult<TStateD>] | [4, ParserResult<TStateE>] | [5, ParserResult<TStateF>] | [6, ParserResult<TStateG>]>;
492
+ /**
493
+ * Creates a parser that combines eight mutually exclusive parsers into one.
494
+ * The resulting parser will try each of the provided parsers in order,
495
+ * and return the result of the first successful parser.
496
+ * @template TA The type of the value returned by the first parser.
497
+ * @template TB The type of the value returned by the second parser.
498
+ * @template TC The type of the value returned by the third parser.
499
+ * @template TD The type of the value returned by the fourth parser.
500
+ * @template TE The type of the value returned by the fifth parser.
501
+ * @template TF The type of the value returned by the sixth parser.
502
+ * @template TG The type of the value returned by the seventh parser.
503
+ * @template TH The type of the value returned by the eighth parser.
504
+ * @template TStateA The type of the state used by the first parser.
505
+ * @template TStateB The type of the state used by the second parser.
506
+ * @template TStateC The type of the state used by the third parser.
507
+ * @template TStateD The type of the state used by the fourth parser.
508
+ * @template TStateE The type of the state used by the fifth parser.
509
+ * @template TStateF The type of the state used by the sixth parser.
510
+ * @template TStateG The type of the state used by the seventh parser.
511
+ * @template TStateH The type of the state used by the eighth parser.
512
+ * @param a The first {@link Parser} to try.
513
+ * @param b The second {@link Parser} to try.
514
+ * @param c The third {@link Parser} to try.
515
+ * @param d The fourth {@link Parser} to try.
516
+ * @param e The fifth {@link Parser} to try.
517
+ * @param f The sixth {@link Parser} to try.
518
+ * @param g The seventh {@link Parser} to try.
519
+ * @param h The eighth {@link Parser} to try.
520
+ * @return A {@link Parser} that tries to parse using the provided parsers
521
+ * in order, returning the result of the first successful parser.
522
+ */
523
+ declare function or<TA, TB, TC, TD, TE, TF, TG, TH, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>, g: Parser<TG, TStateG>, h: Parser<TH, TStateH>): Parser<TA | TB | TC | TD | TE | TF | TG | TH, 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>]>;
524
+ /**
525
+ * Creates a parser that combines nine mutually exclusive parsers into one.
526
+ * The resulting parser will try each of the provided parsers in order,
527
+ * and return the result of the first successful parser.
528
+ * @template TA The type of the value returned by the first parser.
529
+ * @template TB The type of the value returned by the second parser.
530
+ * @template TC The type of the value returned by the third parser.
531
+ * @template TD The type of the value returned by the fourth parser.
532
+ * @template TE The type of the value returned by the fifth parser.
533
+ * @template TF The type of the value returned by the sixth parser.
534
+ * @template TG The type of the value returned by the seventh parser.
535
+ * @template TH The type of the value returned by the eighth parser.
536
+ * @template TI The type of the value returned by the ninth parser.
537
+ * @template TStateA The type of the state used by the first parser.
538
+ * @template TStateB The type of the state used by the second parser.
539
+ * @template TStateC The type of the state used by the third parser.
540
+ * @template TStateD The type of the state used by the fourth parser.
541
+ * @template TStateE The type of the state used by the fifth parser.
542
+ * @template TStateF The type of the state used by the sixth parser.
543
+ * @template TStateG The type of the state used by the seventh parser.
544
+ * @template TStateH The type of the state used by the eighth parser.
545
+ * @template TStateI The type of the state used by the ninth parser.
546
+ * @param a The first {@link Parser} to try.
547
+ * @param b The second {@link Parser} to try.
548
+ * @param c The third {@link Parser} to try.
549
+ * @param d The fourth {@link Parser} to try.
550
+ * @param e The fifth {@link Parser} to try.
551
+ * @param f The sixth {@link Parser} to try.
552
+ * @param g The seventh {@link Parser} to try.
553
+ * @param h The eighth {@link Parser} to try.
554
+ * @param i The ninth {@link Parser} to try.
555
+ * @return A {@link Parser} that tries to parse using the provided parsers
556
+ * in order, returning the result of the first successful parser.
557
+ */
558
+ declare function or<TA, TB, TC, TD, TE, TF, TG, TH, TI, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>, g: Parser<TG, TStateG>, h: Parser<TH, TStateH>, i: Parser<TI, TStateI>): Parser<TA | TB | TC | TD | TE | TF | TG | TH | TI, 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>]>;
559
+ /**
560
+ * Creates a parser that combines ten mutually exclusive parsers into one.
561
+ * The resulting parser will try each of the provided parsers in order,
562
+ * and return the result of the first successful parser.
563
+ * @template TA The type of the value returned by the first parser.
564
+ * @template TB The type of the value returned by the second parser.
565
+ * @template TC The type of the value returned by the third parser.
566
+ * @template TD The type of the value returned by the fourth parser.
567
+ * @template TE The type of the value returned by the fifth parser.
568
+ * @template TF The type of the value returned by the sixth parser.
569
+ * @template TG The type of the value returned by the seventh parser.
570
+ * @template TH The type of the value returned by the eighth parser.
571
+ * @template TI The type of the value returned by the ninth parser.
572
+ * @template TJ The type of the value returned by the tenth parser.
573
+ * @template TStateA The type of the state used by the first parser.
574
+ * @template TStateB The type of the state used by the second parser.
575
+ * @template TStateC The type of the state used by the third parser.
576
+ * @template TStateD The type of the state used by the fourth parser.
577
+ * @template TStateE The type of the state used by the fifth parser.
578
+ * @template TStateF The type of the state used by the sixth parser.
579
+ * @template TStateG The type of the state used by the seventh parser.
580
+ * @template TStateH The type of the state used by the eighth parser.
581
+ * @template TStateI The type of the state used by the ninth parser.
582
+ * @template TStateJ The type of the state used by the tenth parser.
583
+ * @param a The first {@link Parser} to try.
584
+ * @param b The second {@link Parser} to try.
585
+ * @param c The third {@link Parser} to try.
586
+ * @param d The fourth {@link Parser} to try.
587
+ * @param e The fifth {@link Parser} to try.
588
+ * @param f The sixth {@link Parser} to try.
589
+ * @param g The seventh {@link Parser} to try.
590
+ * @param h The eighth {@link Parser} to try.
591
+ * @param i The ninth {@link Parser} to try.
592
+ * @param j The tenth {@link Parser} to try.
593
+ * @return A {@link Parser} that tries to parse using the provided parsers
594
+ * in order, returning the result of the first successful parser.
595
+ */
596
+ declare function or<TA, TB, TC, TD, TE, TF, TG, TH, TI, TJ, TStateA, TStateB, TStateC, TStateD, TStateE, TStateF, TStateG, TStateH, TStateI, TStateJ>(a: Parser<TA, TStateA>, b: Parser<TB, TStateB>, c: Parser<TC, TStateC>, d: Parser<TD, TStateD>, e: Parser<TE, TStateE>, f: Parser<TF, TStateF>, g: Parser<TG, TStateG>, h: Parser<TH, TStateH>, i: Parser<TI, TStateI>, j: Parser<TJ, TStateJ>): Parser<TA | TB | TC | TD | TE | TF | TG | TH | TI | TJ, 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>]>;
437
597
  /**
438
598
  * Merges multiple {@link object} parsers into a single {@link object} parser.
439
599
  * It is useful for combining multiple {@link object} parsers so that
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optique/core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0-dev.34+d4931ae5",
4
4
  "description": "Type-safe combinatorial command-line interface parser",
5
5
  "keywords": [
6
6
  "CLI",