-
Hello, I was wondering if there is a way that for any rule that has been matched, to return the value of whatever string was matched, rather than what other value type that should be returned. Two examples (one over simplified, and one more actual use-case-y): A boolean parser (yes this is not generally how you would actually want to do this, and rather have a separate parser for true and false)
and a more realistic example of trying to parse a decimal
|
Beta Was this translation helpful? Give feedback.
Answered by
foonathan
May 3, 2024
Replies: 1 comment 2 replies
-
You want |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
0x0015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You want
dsl::capture
.