summaryrefslogtreecommitdiff
path: root/clap.zig (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix regression from last commitGravatar Jimmi Holst Christensen2022-10-031-11/+14
|
* Add function for getting the prefix of a param nameGravatar Jimmi Holst Christensen2022-10-031-15/+19
|
* use builtin.Type instead of deprecated builtin.TypeInfoGravatar Jakub Konka2022-09-181-1/+1
| | | | Syncs with latest zig master version 0.10.0-dev.4117+54854e2ab
* Fix zig-clap for new default compilerGravatar Jimmi Holst Christensen2022-08-251-37/+50
| | | | | Also enable test suit for both stage 1 and stage 2, to ensure we don't break things for people who haven't switched yet.
* Have all tests have a nameGravatar Jimmi Holst Christensen2022-07-281-1/+1
| | | | fixes #79
* Print multi value positionals correctly in `usage`Gravatar Jimmi Holst Christensen2022-04-281-0/+6
|
* New `help` api that provides options as to how paramters are printed.Gravatar Jimmi Holst Christensen2022-03-301-92/+686
| | | | fixes \#28
* Fix long param parsing with '-' and '\_' in nameGravatar Jimmi Holst Christensen2022-03-241-2/+6
|
* Add parseParams and friendsGravatar Jimmi Holst Christensen2022-03-231-341/+389
|
* Refactor parseParam into a state machineGravatar Jimmi Holst Christensen2022-03-231-64/+279
| | | | | | This new parser stops when it hits something that looks like a new parameter. This is the precurser to parsing multiple parameters in a single function.
* Workaround infinit loop caused by `try` inside `inline for`Gravatar Jimmi Holst Christensen2022-03-211-19/+59
| | | | fixes #72
* Allow for clap to parse argument values into typesGravatar Jimmi Holst Christensen2022-03-091-181/+365
| | | | | | | | | | | | | | This changes - `.flag`, `.option`, `.options` and `.positionals` are now just fields you access on the result of `parse` and `parseEx`. - `clap.ComptimeClap` has been removed. - `clap.StreamingClap` is now called `clap.streaming.Clap` - `parse` and `parseEx` now takes a `value_parsers` argument that provides the parsers to parse values. - Remove `helpEx`, `helpFull`, `usageEx` and `usageFull`. They now just expect `Id` to have methods for getting the description and value texts.
* Revert "Change clap into generating a struct"Gravatar Jimmi Holst Christensen2022-02-251-48/+217
| | | | This reverts commit cfaac64c404fb1c2e892880410aa3b7dd881ea58.
* Change clap into generating a structGravatar Jimmi Holst Christensen2022-02-251-217/+48
| | | | | | | | | This changes - `.flag`, `.option`, `.options` and `.positionals` are now just fields you access. - Move the current `clap.parse` and friends into `clap.untyped.parse` - This is in preperation for `clap.typed.parse`
* Refactor the ArgIterator interfaceGravatar Jimmi Holst Christensen2022-01-311-4/+10
| | | | | | | | | They now follow the interface provided by the standard library. This now means that we no longer needs `args.OsIterator` as that the one from `std` can now be used directly. Also remove `args.ShellIterator` as a simular iterator exists in `std` called `ArgIteratorGeneral`.
* Avoid using the print APIGravatar Jimmi Holst Christensen2022-01-051-23/+37
| | | | | | The current Zig print API is quite good at slowing down compilation and producing binary bloat. This commit makes an attempt to avoid using it when not nessesary.
* zig master updates: allocator changes (#60)Gravatar Asherah Connor2021-12-061-2/+2
|
* Update mem.split call for latest zig masterGravatar Ryan Liptak2021-09-061-1/+1
|
* Merge branch 'master' into zig-masterGravatar Komari Spaghetti2021-09-051-1/+14
|\
| * Indent help text on every new line to allow for user-controlled wrappingGravatar Ryan Liptak2021-09-051-1/+14
| |
| * Fix all new compiler errors from zig masterGravatar Komari Spaghetti2021-06-241-1/+1
| |
* | Update calls to tokenizerGravatar Stephen Gregoratto2021-08-111-1/+1
| | | | | | | | | | The tokenize function was made generic, so we have to pass the type as the first parameter.
* | Fix all new compiler errors from zig masterGravatar Komari Spaghetti2021-06-241-1/+1
|/
* Stay under 100 chars per line in all the codeGravatar Komari Spaghetti2021-06-241-33/+87
|
* parseParam: Set eval quota to std.math.maxInt(u32)Gravatar Komari Spaghetti2021-06-241-0/+10
| | | | fixes #42 related #39
* parse: Copy in arena after using it in parseExGravatar Komari Spaghetti2021-06-241-11/+9
| | | | fixes #43
* Update to latest zig in preperation for 0.8.0Gravatar Komari Spaghetti2021-05-261-64/+64
|
* Merge branch 'master' into zig-masterGravatar Komari Spaghetti2021-05-261-147/+94
|\
| * Modernize codebaseGravatar Komari Spaghetti2021-05-081-140/+71
| | | | | | | | | | | | | | | | * Better naming for variables * Follow naming style of enums * Use `writer()` instead of `outStream()` * Change many initializers to be a one liner * Don't explicitly initialize fields to their default value
| * Refactor Diagnostic (and others) into a ParseOption structGravatar Komari Spaghetti2021-04-281-10/+26
| | | | | | | | | | | | This allows for default arguments, which we can also extend without breaking peoples code in the future. This is a breaking change right now though.
* | zig master updatesGravatar Asherah Connor2021-01-101-21/+21
|/
* Deprecate ComptimeClap in favor of parseExv0.3.0Gravatar Jimmi Holst Christensen2020-11-101-5/+16
|
* Merge branch 'master' into zig-masterGravatar Jimmi Holst Christensen2020-11-101-2/+2
|\
| * Better parseParamGravatar Jimmi Holst Christensen2020-11-101-188/+144
| |
| * Improve Diagnostic error message reportingGravatar Jimmi Holst Christensen2020-11-031-16/+27
| |
| * Report error context in Diagnostic (#26)Gravatar Komari Spaghetti2020-11-021-2/+49
| |
| * fix upGravatar Asherah Connor2020-09-061-2/+2
| |
| * add documentation to Values enumGravatar Asherah Connor2020-09-061-0/+1
| |
| * parse and validate multiple optionGravatar Asherah Connor2020-09-061-34/+72
| |
| * parse multiple optionsGravatar Asherah Connor2020-09-061-0/+4
| |
| * Fix expected type error on 32 bit systemsGravatar Jimmi Holst Christensen2020-08-151-2/+2
| | | | | | | | fixes #23
* | Better parseParamGravatar Jimmi Holst Christensen2020-11-101-188/+144
| |
* | Improve Diagnostic error message reportingGravatar Jimmi Holst Christensen2020-11-031-16/+27
| |
* | Replace `var` with `anytype`Gravatar Jimmi Holst Christensen2020-11-021-1/+1
| |
* | Report error context in Diagnostic (#26)Gravatar Komari Spaghetti2020-11-021-2/+49
| |
* | fix upGravatar Asherah Connor2020-08-281-2/+2
| |
* | add documentation to Values enumGravatar Asherah Connor2020-08-281-0/+1
| |
* | parse and validate multiple optionGravatar Asherah Connor2020-08-281-34/+72
| |
* | parse multiple optionsGravatar Asherah Connor2020-08-281-0/+4
| |
* | update to latest zigGravatar joachimschmidt5572020-07-131-10/+10
|/ | | | var -> anytype