# New Ticket Created by Vasily Chekalkin # Please include the string: [perl #54312] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=54312 >
Hello. There is implementation of 'infix:=>' for Rakudo
Index: src/parser/grammar-oper.pg =================================================================== --- src/parser/grammar-oper.pg (revision 27566) +++ src/parser/grammar-oper.pg (working copy) @@ -128,6 +128,7 @@ proto infix:<:=> is equiv(infix:<=>) is pasttype('bind') { ... } proto infix:<::=> is equiv(infix:<=>) { ... } proto infix:<.=> is equiv(infix:<=>) { ... } +proto infix:«=>» is equiv(infix:<=>) { ... } proto infix:<~=> is equiv(infix:<=>) { ... } proto infix:<+=> is equiv(infix:<=>) { ... } proto infix:<-=> is equiv(infix:<=>) { ... } Index: src/classes/Pair.pir =================================================================== --- src/classes/Pair.pir (revision 27566) +++ src/classes/Pair.pir (working copy) @@ -137,7 +137,43 @@ .return($S2) .end +=item get_string() (vtable method) +Return the pair in stringified form + +=cut + +.sub 'get_string' :vtable :method + $P0 = self.'perl'() + .return ($P0) +.end + +=head1 Functions + +=cut + +.namespace + +=item infix:=> + +Create Pair + +=cut + +.sub 'infix:=>' + .param pmc key + .param pmc value + .local pmc pair + + pair = new 'Perl6Pair' + setattribute pair, '$!key', key + setattribute pair, '$!value', value + + .return (pair) + + #.return (pair) +.end + =back =cut