summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-05-31 18:27:19 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-05-31 20:34:23 -0700
commit4ebc798659d1b2b92cfe1d21cb6a18cf64ce9f31 (patch)
tree01b04c4f24902b7385df008ae2f377be0fa31272 /toke.c
parentcc37ebcee3a931a3822ae6ff30415eba7a1a4540 (diff)
downloadperl-4ebc798659d1b2b92cfe1d21cb6a18cf64ce9f31.tar.gz
toke.c: Under -DT, report pending idents more clearly
These are treated as forced tokens of type 'p'. Indicate what the 'p' means in the debug output. This: ### 0:LEX_NORMAL/XSTATE "\n;" ### forced token: ### <== 'p' becomes this: ### 0:LEX_NORMAL/XSTATE "\n;" ### forced token: ### <== 'p' (pending identifier)
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index ba67bc67f7..954ec330b9 100644
--- a/toke.c
+++ b/toke.c
@@ -427,7 +427,11 @@ S_tokereport(pTHX_ I32 rv, const YYSTYPE* lvalp)
if (name)
Perl_sv_catpv(aTHX_ report, name);
else if ((char)rv > ' ' && (char)rv <= '~')
+ {
Perl_sv_catpvf(aTHX_ report, "'%c'", (char)rv);
+ if ((char)rv == 'p')
+ sv_catpvs(report, " (pending identifier)");
+ }
else if (!rv)
sv_catpvs(report, "EOF");
else