[javascriptlint-commit] SF.net SVN: javascriptlint:[333] trunk
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2013-10-03 20:13:40
|
Revision: 333 http://sourceforge.net/p/javascriptlint/code/333 Author: matthiasmiller Date: 2013-10-03 20:13:37 +0000 (Thu, 03 Oct 2013) Log Message: ----------- Fix parsing numbers with exponents. Modified Paths: -------------- trunk/jsengine/tokenizer/__init__.py trunk/test.py Added Paths: ----------- trunk/tests/bugs/numbers.js Modified: trunk/jsengine/tokenizer/__init__.py =================================================================== --- trunk/jsengine/tokenizer/__init__.py 2013-10-03 19:48:25 UTC (rev 332) +++ trunk/jsengine/tokenizer/__init__.py 2013-10-03 20:13:37 UTC (rev 333) @@ -397,7 +397,8 @@ if stream.readif(1, 'eE'): stream.readif(1, '+-') - stream.require(_DIGITS) + if not stream.readif(1, _DIGITS): + raise JSSyntaxError(stream.getpos(), 'syntax_error') while stream.readif(1, _DIGITS): pass Modified: trunk/test.py =================================================================== --- trunk/test.py 2013-10-03 19:48:25 UTC (rev 332) +++ trunk/test.py 2013-10-03 20:13:37 UTC (rev 333) @@ -105,6 +105,10 @@ def _get_python_modules(dir_): for root, dirs, files in os.walk(dir_): + for exclude in ('build', 'dist'): + if exclude in dirs: + build.remove(exclude) + if '.svn' in dirs: dirs.remove('.svn') for name in files: Added: trunk/tests/bugs/numbers.js =================================================================== --- trunk/tests/bugs/numbers.js (rev 0) +++ trunk/tests/bugs/numbers.js 2013-10-03 20:13:37 UTC (rev 333) @@ -0,0 +1,5 @@ +function number() { + var i = 1.1e10; + i = 1.1e+10; + i = 1.1e-10; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |