From: <fwi...@us...> - 2009-10-01 20:49:05
|
Revision: 6820 http://jython.svn.sourceforge.net/jython/?rev=6820&view=rev Author: fwierzbicki Date: 2009-10-01 20:48:58 +0000 (Thu, 01 Oct 2009) Log Message: ----------- Added a comment for trailing whitespace handling in single mode. Tobias asked me what it did and it took way too long to answer :) Modified Paths: -------------- trunk/jython/grammar/Python.g Modified: trunk/jython/grammar/Python.g =================================================================== --- trunk/jython/grammar/Python.g 2009-10-01 20:11:08 UTC (rev 6819) +++ trunk/jython/grammar/Python.g 2009-10-01 20:48:58 UTC (rev 6820) @@ -2030,6 +2030,15 @@ } } } else if (this.single && newlines == 1) { + // This is here for this case in interactive mode: + // + // def foo(): + // print 1 + // <spaces but no code> + // + // The above would complete in interactive mode instead + // of giving ... to wait for more input. + // throw new ParseException("Trailing space in single mode."); } else { // make a string of n newlines This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |