From b7c3e77c828502e6c8aedf168616985fa5aecd24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Suzanne=20Dup=C3=A9ron?= Date: Tue, 14 Apr 2020 17:09:48 +0200 Subject: [PATCH] Remove trailing whitespace while parsing in ADT generator --- src/stages/adt_generator/generator.raku | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stages/adt_generator/generator.raku b/src/stages/adt_generator/generator.raku index 6fc05e73b..85146e887 100644 --- a/src/stages/adt_generator/generator.raku +++ b/src/stages/adt_generator/generator.raku @@ -9,7 +9,7 @@ my $record = "_ _ record"; sub poly { $^type_name } my $l = @*ARGS[0].IO.lines; -$l = $l.map(*.subst: /^\s+/, ""); +$l = $l.map(*.subst: /(^\s+|\s+$)/, ""); $l = $l.list.cache; my $statement_re = /^((\(\*\s+)?(open|include)\s|\[\@\@\@warning\s)/; my $statements = $l.grep($statement_re);