]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
only check this when parsing python
authorBenjamin Peterson <benjamin@python.org>
Thu, 19 Jan 2012 13:48:11 +0000 (08:48 -0500)
committerBenjamin Peterson <benjamin@python.org>
Thu, 19 Jan 2012 13:48:11 +0000 (08:48 -0500)
Parser/parsetok.c

index 9b2d7306ff6bce4ee80b8bfc729d7ad6492cbc00..ad5f7ba5d4c28d83dbd10ca316efbb1f122a8985 100644 (file)
@@ -225,6 +225,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
         n = ps->p_tree;
         ps->p_tree = NULL;
 
+#ifndef PGEN
         /* Check that the source for a single input statement really
            is a single statement by looking at what is left in the
            buffer after parsing.  Trailing whitespace and comments
@@ -241,6 +242,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
                 n = NULL;
             }
         }
+#endif
     }
     else
         n = NULL;