-
-
Save zoffixznet/7ac7991e2aa9a197f6ddfc06543639d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Perl6/Optimizer.nqp b/src/Perl6/Optimizer.nqp | |
index 0954dfc..6d84b8e 100644 | |
--- a/src/Perl6/Optimizer.nqp | |
+++ b/src/Perl6/Optimizer.nqp | |
@@ -1377,24 +1377,12 @@ class Perl6::Optimizer { | |
} | |
method convert_unicode_op_to_texas($op) { | |
- sub should-texify ($from, $to) { | |
- try { | |
- $!symbols.find_lexical($to); | |
- $!symbols.is_from_core($to) && 1; | |
- } ?? 1 !! 0; | |
- } | |
- | |
- if $!symbols.is_from_core: $op.name { | |
- my $name := $op.name; | |
- if ($name eq '&infix:<≤>' | |
- && should-texify('&infix:<≤>', '&infix:«<=»')) { | |
- $op.name: '&infix:«<=»' } | |
- elsif ($name eq '&infix:<≥>' | |
- && should-texify('&infix:<≥>', '&infix:«>=»')) { | |
- $op.name: '&infix:«>=»' } | |
- elsif ($name eq '&infix:<≠>' | |
- && should-texify('&infix:<≠>', '&infix:<!=>')) { | |
- $op.name: '&infix:<!=>' } | |
+ sub asciify ($to) { $!symbols.find_lexical($to); $!symbols.is_from_core($to) && $op.name: $to } | |
+ | |
+ if $!symbols.is_from_core: my $name := $op.name { | |
+ if ($name eq '&infix:<≤>') { asciify('&infix:«<=»') } | |
+ elsif ($name eq '&infix:<≥>') { asciify('&infix:«>=»') } | |
+ elsif ($name eq '&infix:<≠>') { asciify('&infix:<!=>') } | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment