stringify

in lib/twitter_cldr/parsers/unicode_regex/character_class.rb [88:107]


        def stringify(node)
          case node
            when UnaryOperator, BinaryOperator
              op_str = case node.operator
                when :negate then '^'
                when :union, :pipe then ''
                when :dash then '-'
                when :ampersand then '&'
              end

              left = stringify(node.left)
              right = stringify(node.right)

              "#{left}#{op_str}#{right}"

            else
              node.to_s
          end
        end