From 3ed8d4db0003ae3953819d6ef4951dbadf76144d Mon Sep 17 00:00:00 2001 From: Smaug123 <3138005+Smaug123@users.noreply.github.com> Date: Thu, 17 Apr 2025 21:38:44 +0100 Subject: [PATCH] Add help text placeholder --- ConsumePlugin/GeneratedArgs.fs | 58 +++++++++++++++++++++++ WoofWare.Myriad.Plugins/ShibaGenerator.fs | 17 +++++++ 2 files changed, 75 insertions(+) diff --git a/ConsumePlugin/GeneratedArgs.fs b/ConsumePlugin/GeneratedArgs.fs index abb1f6f..af936ce 100644 --- a/ConsumePlugin/GeneratedArgs.fs +++ b/ConsumePlugin/GeneratedArgs.fs @@ -196,6 +196,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed Basic. type internal Basic_InProgress = { @@ -393,6 +396,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed BasicWithIntPositionals. type internal BasicWithIntPositionals_InProgress = { @@ -594,6 +600,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed LoadsOfTypes. type internal LoadsOfTypes_InProgress = { @@ -998,6 +1007,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed LoadsOfTypesNoPositionals. type internal LoadsOfTypesNoPositionals_InProgress = { @@ -1370,6 +1382,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed DatesAndTimes. type internal DatesAndTimes_InProgress = { @@ -1584,6 +1599,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed ChildRecord. type internal ChildRecord_InProgress = @@ -1716,6 +1733,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed ParentRecord. type internal ParentRecord_InProgress = @@ -1868,6 +1887,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed ChildRecordWithPositional. type internal ChildRecordWithPositional_InProgress = { @@ -1998,6 +2020,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed ParentRecordChildPos. type internal ParentRecordChildPos_InProgress = @@ -2150,6 +2174,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed ParentRecordSelfPos. type internal ParentRecordSelfPos_InProgress = { @@ -2291,6 +2318,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed ChoicePositionals. type internal ChoicePositionals_InProgress = @@ -2385,6 +2414,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed ContainsBoolEnvVar. type internal ContainsBoolEnvVar_InProgress = @@ -2513,6 +2544,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed WithFlagDu. type internal WithFlagDu_InProgress = { @@ -2645,6 +2679,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed ContainsFlagEnvVar. type internal ContainsFlagEnvVar_InProgress = { @@ -2799,6 +2836,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed ContainsFlagDefaultValue. type internal ContainsFlagDefaultValue_InProgress = { @@ -2929,6 +2969,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed ManyLongForms. type internal ManyLongForms_InProgress = { @@ -3138,6 +3181,9 @@ module internal ArgParseHelpers_ConsumePlugin = else false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" + /// A partially-parsed FlagsIntoPositionalArgs. type internal FlagsIntoPositionalArgs_InProgress = { @@ -3270,6 +3316,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed FlagsIntoPositionalArgsChoice. type internal FlagsIntoPositionalArgsChoice_InProgress = @@ -3393,6 +3441,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed FlagsIntoPositionalArgsInt. type internal FlagsIntoPositionalArgsInt_InProgress = @@ -3530,6 +3580,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed FlagsIntoPositionalArgsIntChoice. type internal FlagsIntoPositionalArgsIntChoice_InProgress = @@ -3657,6 +3709,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed FlagsIntoPositionalArgs'. type internal FlagsIntoPositionalArgs'_InProgress = @@ -3794,6 +3848,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" /// A partially-parsed PassThru. type internal PassThru_InProgress = @@ -3889,6 +3945,8 @@ module internal ArgParseHelpers_ConsumePlugin = /// Returns false if we didn't set a value. member this.SetFlagValue_ (errors_ : ResizeArray) (key : string) : bool = false + /// Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces. + static member HelpText_ (prefix : string option) (indent : int) : string = failwith "TODO" namespace ConsumePlugin open ArgParserHelpers diff --git a/WoofWare.Myriad.Plugins/ShibaGenerator.fs b/WoofWare.Myriad.Plugins/ShibaGenerator.fs index 971ef9f..e3f6d10 100644 --- a/WoofWare.Myriad.Plugins/ShibaGenerator.fs +++ b/WoofWare.Myriad.Plugins/ShibaGenerator.fs @@ -1339,6 +1339,22 @@ module internal ShibaGenerator = ) |> SynMemberDefn.memberImplementation + let helpText = + SynExpr.createIdent "failwith" + |> SynExpr.applyTo (SynExpr.CreateConst "TODO") + |> SynBinding.basic + [ Ident.create "HelpText_" ] + [ + SynPat.named "prefix" |> SynPat.annotateType (SynType.option SynType.string) + SynPat.named "indent" |> SynPat.annotateType SynType.int + ] + |> SynBinding.withXmlDoc ( + PreXmlDoc.create + "Compute help text for this parser, optionally noting the given prefix on each argument and indenting each line by this many spaces." + ) + |> SynBinding.withReturnAnnotation SynType.string + |> SynMemberDefn.staticMember + let emptyConstructor = [ for KeyValue (nodeName, leaf) in record.LeafNodes do @@ -1501,6 +1517,7 @@ module internal ShibaGenerator = processKeyValueChildRecords Some processKeyValue Some setFlagValue + Some helpText ] |> List.choose id |> Some