From 559c6bed0e2c7013ceee69946c6eae09403d6ac2 Mon Sep 17 00:00:00 2001 From: Gregor Kappler Date: Mon, 10 Aug 2020 17:18:40 +0200 Subject: [PATCH] @seq macro discard whitespace --- src/CombinedParsers.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CombinedParsers.jl b/src/CombinedParsers.jl index 76e83c9..f9f4fa4 100644 --- a/src/CombinedParsers.jl +++ b/src/CombinedParsers.jl @@ -1045,6 +1045,7 @@ export @seq @seq(x...) Create a sequence interleaved with whitespace (horizontal or vertical). +The result_type is omitting whitespace. """ macro seq(x...) r = if length(x)==1 @@ -1052,7 +1053,7 @@ macro seq(x...) else quote x_ = [$(x...)] - sSequence( (i < lastindex(x_) ? (e*CombinedParsers.Regexp.whitespace_newline) : e for (i,e) in enumerate(x_))...) + sSequence( (i < lastindex(x_) ? (e*CombinedParsers.Regexp.whitespace_newline)[1] : e for (i,e) in enumerate(x_))...) end end esc(r)