Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument parsing, validation from manifest preamble #106

Open
homonoidian opened this issue Aug 9, 2023 · 0 comments
Open

Argument parsing, validation from manifest preamble #106

homonoidian opened this issue Aug 9, 2023 · 0 comments
Labels
enhancement New feature or request future Not urgent

Comments

@homonoidian
Copy link
Collaborator

Like in Python docopt, runtime gets arguments as words (or in an args block for instance, as in args.filename, or args.optlevel, etc.) How the usage should be parsed out I have no idea at the moment, but it's perfectly doable of course. The syntax is yet to be clarified.

nolayout
hello.nk
---
Some help message stuff...

Usage:
   --  <filename> [optlevel]

Some more help message stuff...

And in hello.nk for instance:

'Filename: ' args.filename ~ echo
args.optlevel? => [ 'Optlevel:' _ echo ]

"It'd be nice to automatically define ( -- V true / false ) to get the Value of an optional parameter"
@homonoidian homonoidian added enhancement New feature or request future Not urgent labels Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future Not urgent
Projects
None yet
Development

No branches or pull requests

1 participant