Raku / old-issue-tracker

Tickets from RT
https://github.com/Raku/old-issue-tracker/issues
2 stars 1 forks source link

deparsing is surprised by slip interpolation #4866

Open p6rt opened 8 years ago

p6rt commented 8 years ago

Migrated from rt.perl.org#126905 (status was 'new')

Searchable as RT126905$

p6rt commented 8 years ago

From zefram@fysh.org

With [perl #​126897] fixed, deparsing of some kinds of structure containing Slip objects now runs into the interpolation of Slip objects into lists. This leads to round-trip failures​:

my @​a = (11,22,33) [11 22 33] @​a[1] := slip(44,55) (44 55) @​a.perl [11, slip(44, 55), 33] @​a.perl.EVAL.perl [11, 44, 55, 33] @​a.List.perl (11, slip(44, 55), 33) @​a.List.perl.EVAL.perl (11, 44, 55, 33) @​a.Slip.perl slip(11, slip(44, 55), 33) @​a.Slip.perl.EVAL.perl slip(11, 44, 55, 33)

The deparsing needs to take account of the interpolation, and produce output that either avoids it or corrects for it. Before [perl #​126897], of course, round-tripping of these structures failed in the more obvious manner of turning the Slip into a List.

-zefram