diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-01 12:54:24 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-05-01 12:54:24 +0000 |
commit | dbc0d4f2f139c3775c592bb9d20ada906e3aa68e (patch) | |
tree | bd9ee5e86f271d0c274ac2e292d05fb991390291 /toke.c | |
parent | f76b0f6998c929fc8d564ca3ed8728a19879ebc7 (diff) | |
download | perl-dbc0d4f2f139c3775c592bb9d20ada906e3aa68e.tar.gz |
Provide the \N{U+HHHH} syntax before we forget.
p4raw-id: //depot/perl@16302
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1540,6 +1540,16 @@ S_scan_const(pTHX_ char *start) e = s - 1; goto cont_scan; } + if (e > s + 2 && s[1] == 'U' && s[2] == '+') { + /* \N{U+...} */ + I32 flags = PERL_SCAN_ALLOW_UNDERSCORES | + PERL_SCAN_DISALLOW_PREFIX; + s += 3; + len = e - s; + uv = grok_hex(s, &len, &flags, NULL); + s = e + 1; + goto NUM_ESCAPE_INSERT; + } res = newSVpvn(s + 1, e - s - 1); res = new_constant( Nullch, 0, "charnames", res, Nullsv, "\\N{...}" ); |