Also pipe through parser in PositionalArgs true (#259)

This commit is contained in:
Patrick Stevens
2024-09-13 17:11:53 +01:00
committed by GitHub
parent 49ecfbf5e5
commit 693b95106a
4 changed files with 563 additions and 2 deletions

View File

@@ -1140,6 +1140,12 @@ module internal ArgParserGenerator =
| Some includeFlagLike ->
[
SynExpr.createIdent "key"
|> SynExpr.pipeThroughFunction leftoverArgParser
|> fun i ->
match leftoverArgAcc with
| ChoicePositional.Choice _ ->
i |> SynExpr.pipeThroughFunction (SynExpr.createIdent "Choice1Of2")
| ChoicePositional.Normal _ -> i
|> SynExpr.pipeThroughFunction (SynExpr.createLongIdent' [ leftoverArgs ; Ident.create "Add" ])
SynExpr.createIdent "go"