summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Fraser <fraserbn@gmail.com>2013-03-05 20:40:34 -0300
committerKarl Williamson <public@khwilliamson.com>2013-03-06 15:02:40 -0700
commit8ea4c679c8b563e13695d0d28d68e63e34ead44b (patch)
treeb604fb90807821538d64144957c837820d824db2
parent32833930e32dc619abdaaab54e88de2a2765fb86 (diff)
downloadperl-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.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/toke.c b/toke.c
index 1ea0da7fde..4579e63d0d 100644
--- a/toke.c
+++ b/toke.c
@@ -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)