diff --git a/src/Raku/ast/pair.rakumod b/src/Raku/ast/pair.rakumod index 861ff9b2abc..03281585cc2 100644 --- a/src/Raku/ast/pair.rakumod +++ b/src/Raku/ast/pair.rakumod @@ -115,6 +115,10 @@ class RakuAST::ColonPair::True is RakuAST::QuotePair { $obj } + method canonicalize() { + nqp::getattr(self, RakuAST::ColonPair, '$!key') + } + method PRODUCE-IMPLICIT-LOOKUPS() { self.IMPL-WRAP-LIST([ RakuAST::Type::Setting.new(RakuAST::Name.from-identifier('Pair')) @@ -150,6 +154,10 @@ class RakuAST::ColonPair::False is RakuAST::QuotePair { $obj } + method canonicalize() { + "!" ~ nqp::getattr(self, RakuAST::ColonPair, '$!key') + } + method PRODUCE-IMPLICIT-LOOKUPS() { self.IMPL-WRAP-LIST([ RakuAST::Type::Setting.new(RakuAST::Name.from-identifier('Pair'))