aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parcom/parser.cr4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parcom/parser.cr b/src/parcom/parser.cr
index 57c7b44..af486c4 100644
--- a/src/parcom/parser.cr
+++ b/src/parcom/parser.cr
@@ -456,8 +456,8 @@ module Parcom
# instance of `self`. It will succeed if it can parse an instance of `self`
# that is not followed by any `sep` instances.
def sep_by(sep : Parser(T, _)) : Parser(T, Array(U))
- (self + (sep >> self).many).map do |tup|
- tup.last.unshift(tup.first)
+ (self + (sep >> self).many).map do |head, tail|
+ tail.unshift(head)
end.named("<#{@name}> sep by <#{sep.name}>")
end
end