diff options
| -rw-r--r-- | src/parcom.cr | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parcom.cr b/src/parcom.cr index 50f6e7e..028f596 100644 --- a/src/parcom.cr +++ b/src/parcom.cr @@ -69,6 +69,11 @@ module Parcom end end + # A `Result` stores a `Tokens` object and a parsed value, + # and is effectively used to store the state of a parser chain. + # This is used instead of a `Tuple` or `NamedTuple` because: + # 1. This is more idiomatic than a `Tuple`. + # 2. Crystal does not support generic named tuples. struct Result(T, V) getter tokens, value |
