diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-05-31 18:27:19 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-05-31 20:34:23 -0700 |
commit | 4ebc798659d1b2b92cfe1d21cb6a18cf64ce9f31 (patch) | |
tree | 01b04c4f24902b7385df008ae2f377be0fa31272 /toke.c | |
parent | cc37ebcee3a931a3822ae6ff30415eba7a1a4540 (diff) | |
download | perl-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |