Remove trailing whitespace while parsing in ADT generator

This commit is contained in:
Suzanne Dupéron 2020-04-14 17:09:48 +02:00
parent 1f0491e367
commit b7c3e77c82

View File

@ -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);