-
Notifications
You must be signed in to change notification settings - Fork 620
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
main: introduce --_paramdef-<LANG>=<NAME>,<DESCRIPTION> option #3613
Conversation
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Like kindControlBlock, paramControlBlock is a building block for adding --paramdef-<LANG>=... option. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
…<LANG>... Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Codecov ReportBase: 82.84% // Head: 82.85% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3613 +/- ##
==========================================
+ Coverage 82.84% 82.85% +0.01%
==========================================
Files 223 223
Lines 54279 54379 +100
==========================================
+ Hits 44965 45057 +92
- Misses 9314 9322 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
59148ef
to
e8847f7
Compare
With the option, you can define a parser-specific parameter to your optlib parser.
In the following example, we define a parser,
Foo
with a parser-specific parameterVAR
. If the parser sees "x" in an input stream, a code fragment of optscript attached to the pattern/(x)/
runs. The code fragment (1) checks whether a value forVAR
is given, (2) emits a tag with the value given to parameterVAR
as name and withxval
kind, and (3) removes the cork index from the operand stack.args.ctags:
input.foo:
When running the parser, we can give a value ("hereiam" in the following example) for the parameter
VAR
: