• chasonr's avatar
    Implement \u notation for strings and regexes. · 509cbc51
    chasonr authored
    This change adds the \u notation for double quoted strings and regular
    expressions.  It does not implement the \u notation for character literals.
    Both the \uNNNN and \u{NNNN} notations are supported.
    
    \uNNNN is implemented by emitting equivalent UTF-8; that is, "\u4000" is
    equivalent to "\xE4\x80\x80".
    
    Unlike CRuby, the \u{NNNN} notation allows only one character per pair of
    braces; I see no way to lift this restriction without remodeling the parser.
    509cbc51
unicode.rb 1.75 KB