This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Under -DT, report pending idents more clearly
[perl5.git] / toke.c
diff --git a/toke.c b/toke.c
index ba67bc6..954ec33 100644 (file)
--- 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