Advertisement
Guest User

Perl 6 unicode quoting issues

a guest
Jul 21st, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 6 0.64 KB | None | 0 0
  1. for ^0xffff -> $i {
  2.     my $c = try { $i.chr };
  3.     next if !$c.defined or $c eq "(";
  4.     next unless $c ~~ /<:Ps>|<:Pi>/;
  5.     my $end = :16(uniprop($c, "Bidi_Mirroring_Glyph"));
  6.     next unless $end.defined;
  7.     $end = $end.chr;
  8.     my $q = qq{q$c foo $end};
  9.     if ! try {$q.EVAL}.defined {
  10.         say "Cannot parse quoting $q";
  11.     }
  12. }
  13.  
  14. # output:
  15. #
  16. #Cannot parse quoting q⟬ foo ⟭
  17. #Cannot parse quoting q⟮ foo ⟯
  18. #Cannot parse quoting q⦍ foo ⦐
  19. #Cannot parse quoting q⦏ foo ⦎
  20. #Cannot parse quoting q⸢ foo ⸣
  21. #Cannot parse quoting q⸤ foo ⸥
  22. #Cannot parse quoting q⸦ foo ⸧
  23. #Cannot parse quoting q⸨ foo ⸩
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement