Skip to content

Commit 6da4c51

Browse files
committed
Update 'Brainf_ckSharp.Cli'
1 parent c1dd64a commit 6da4c51

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/Brainf_ckSharp.Cli/Options.cs

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Brainf_ckSharp.Enums;
1+
using Brainf_ckSharp.Enums;
22
using CommandLine;
33

44
namespace Brainf_ckSharp.Cli;
@@ -56,14 +56,24 @@ public sealed class Options
5656
public int MemorySize { get; set; }
5757

5858
/// <summary>
59-
/// Gets or sets the overflow mode to use for the memory buffer
59+
/// Gets or sets the data type to use in the memory buffer
6060
/// </summary>
6161
[Option(
62-
"overflow",
63-
Default = OverflowMode.ByteWithOverflow,
64-
HelpText = "The overflow mode to use for the memory buffer [ByteWithOverflow|ByteWithNoOverflow|UshortWithOverflow|UshortWithNoOverflow]",
62+
"data-type",
63+
Default = DataType.Byte,
64+
HelpText = "The data type to use for the memory buffer [Byte|UnsignedShort]",
6565
Required = false)]
66-
public OverflowMode OverflowMode { get; set; }
66+
public DataType DataType { get; set; }
67+
68+
/// <summary>
69+
/// Gets or sets the execution options to use to run the script
70+
/// </summary>
71+
[Option(
72+
"execution-options",
73+
Default = ExecutionOptions.AllowOverflow,
74+
HelpText = "The execution options to use to run the script [None|AllowOverflow]",
75+
Required = false)]
76+
public ExecutionOptions ExecutionOptions { get; set; }
6777

6878
/// <summary>
6979
/// Gets or sets the path for a file to dump the output buffer to

src/Brainf_ckSharp.Cli/Program.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.IO;
33
using System.Threading;
44
using Brainf_ckSharp.Cli;
@@ -56,7 +56,8 @@
5656
.WithSource(source)
5757
.WithStdin(stdin)
5858
.WithMemorySize(options.MemorySize)
59-
.WithOverflowMode(options.OverflowMode)
59+
.WithDataType(options.DataType)
60+
.WithExecutionOptions(options.ExecutionOptions)
6061
.WithExecutionToken(cts.Token)
6162
.TryRun();
6263

0 commit comments

Comments
 (0)