diff options
author | Brian Fraser <fraserbn@gmail.com> | 2013-03-05 20:40:34 -0300 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-03-06 15:02:40 -0700 |
commit | 8ea4c679c8b563e13695d0d28d68e63e34ead44b (patch) | |
tree | b604fb90807821538d64144957c837820d824db2 | |
parent | 32833930e32dc619abdaaab54e88de2a2765fb86 (diff) | |
download | perl-8ea4c679c8b563e13695d0d28d68e63e34ead44b.tar.gz |
open FOO || die; doesn't need a special identifier parser.
Turns out this can just use scan_word().
-rw-r--r-- | toke.c | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -8105,15 +8105,9 @@ Perl_yylex(pTHX) case KEY_open: s = SKIPSPACE1(s); if (isIDFIRST_lazy_if(s,UTF)) { - const char *t; - for (d = s; isWORDCHAR_lazy_if(d,UTF);) { - d += UTF ? UTF8SKIP(d) : 1; - if (UTF) { - while (isIDCONT_utf8((U8*)d)) { - d += UTF ? UTF8SKIP(d) : 1; - } - } - } + const char *t; + d = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, FALSE, + &len); for (t=d; isSPACE(*t);) t++; if ( *t && strchr("|&*+-=!?:.", *t) && ckWARN_d(WARN_PRECEDENCE) |