Merge branch 'bugfix/adt-generator-whitespace-eol' into 'dev'

Remove trailing whitespace while parsing in ADT generator

See merge request ligolang/ligo!568
This commit is contained in:
Pierre-Emmanuel Wulfman 2020-04-14 16:22:32 +00:00
commit fb7abe045f

View File

@ -9,7 +9,7 @@ my $record = "_ _ record";
sub poly { $^type_name } sub poly { $^type_name }
my $l = @*ARGS[0].IO.lines; my $l = @*ARGS[0].IO.lines;
$l = $l.map(*.subst: /^\s+/, ""); $l = $l.map(*.subst: /(^\s+|\s+$)/, "");
$l = $l.list.cache; $l = $l.list.cache;
my $statement_re = /^((\(\*\s+)?(open|include)\s|\[\@\@\@warning\s)/; my $statement_re = /^((\(\*\s+)?(open|include)\s|\[\@\@\@warning\s)/;
my $statements = $l.grep($statement_re); my $statements = $l.grep($statement_re);