summaryrefslogtreecommitdiff
path: root/clap.zig
diff options
context:
space:
mode:
Diffstat (limited to 'clap.zig')
-rw-r--r--clap.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/clap.zig b/clap.zig
index bdd1bf4..2715dcc 100644
--- a/clap.zig
+++ b/clap.zig
@@ -93,7 +93,7 @@ pub const Names = struct {
93/// * Value parameters must take a value. 93/// * Value parameters must take a value.
94pub fn Param(comptime Id: type) type { 94pub fn Param(comptime Id: type) type {
95 return struct { 95 return struct {
96 const Self = this; 96 const Self = @This();
97 97
98 id: Id, 98 id: Id,
99 takes_value: bool, 99 takes_value: bool,
@@ -119,7 +119,7 @@ pub fn Param(comptime Id: type) type {
119/// The result returned from ::Clap.next 119/// The result returned from ::Clap.next
120pub fn Arg(comptime Id: type) type { 120pub fn Arg(comptime Id: type) type {
121 return struct { 121 return struct {
122 const Self = this; 122 const Self = @This();
123 123
124 param: *const Param(Id), 124 param: *const Param(Id),
125 value: ?[]const u8, 125 value: ?[]const u8,
@@ -136,7 +136,7 @@ pub fn Arg(comptime Id: type) type {
136/// A interface for iterating over command line arguments 136/// A interface for iterating over command line arguments
137pub fn ArgIterator(comptime E: type) type { 137pub fn ArgIterator(comptime E: type) type {
138 return struct { 138 return struct {
139 const Self = this; 139 const Self = @This();
140 const Error = E; 140 const Error = E;
141 141
142 nextFn: fn (iter: *Self) Error!?[]const u8, 142 nextFn: fn (iter: *Self) Error!?[]const u8,
@@ -210,7 +210,7 @@ pub const OsArgIterator = struct {
210/// ::Clap.next to parse all the arguments of your program. 210/// ::Clap.next to parse all the arguments of your program.
211pub fn Clap(comptime Id: type, comptime ArgError: type) type { 211pub fn Clap(comptime Id: type, comptime ArgError: type) type {
212 return struct { 212 return struct {
213 const Self = this; 213 const Self = @This();
214 214
215 const State = union(enum) { 215 const State = union(enum) {
216 Normal, 216 Normal,