Leont / yamlish

An implementation of YAML in Raku
Artistic License 2.0
21 stars 18 forks source link

Trailing Whitespace Breaks Parsing #3

Closed tgt closed 9 years ago

tgt commented 9 years ago

The following code causes a Failure. I've used \c[SPACE] to make it more clear where the trailing space is. Adding an extra space to the lines containing 3 and 4 causes it to parse successfully. I've checked that this is valid YAML using Perl 5's YAML::Tiny.

use YAMLish;

my $a = qq:to/END/;

---
- 1
- 2
-\c[SPACE]
  - 3
  - 4
END

my $b = load-yaml($a);

dd $b;
Leont commented 9 years ago

This seems to be a side-effect of an 'is this a bug or a feature' in perl6 itself (regarding the scope of temps inside a rule). I seem to have figured out how to work around it, but I hope this can be fixed in the language instead.

Leont commented 9 years ago

This should be fixed by 39cb2681