[javascriptlint-commit] SF.net SVN: javascriptlint:[212] trunk/pyjsl
Status: Beta
Brought to you by:
matthiasmiller
|
From: <mat...@us...> - 2008-08-23 22:32:51
|
Revision: 212
http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=212&view=rev
Author: matthiasmiller
Date: 2008-08-23 22:32:48 +0000 (Sat, 23 Aug 2008)
Log Message:
-----------
slight fix to r210
Modified Paths:
--------------
trunk/pyjsl/jsparse.py
trunk/pyjsl/lint.py
Modified: trunk/pyjsl/jsparse.py
===================================================================
--- trunk/pyjsl/jsparse.py 2008-08-23 22:24:59 UTC (rev 211)
+++ trunk/pyjsl/jsparse.py 2008-08-23 22:32:48 UTC (rev 212)
@@ -124,7 +124,7 @@
return True
-def _parse_comments(script, root, node_positions, ignore_ranges):
+def _parse_comments(script, node_positions, ignore_ranges):
pos = 0
single_line_re = r"//[^\r\n]*"
multi_line_re = r"/\*(.*?)\*/"
@@ -198,7 +198,7 @@
process(kid)
process(root_node)
- return _parse_comments(script, root_node, positions, comment_ignore_ranges)
+ return _parse_comments(script, positions, comment_ignore_ranges)
def is_compilable_unit(script):
return pyspidermonkey.is_compilable_unit(script)
Modified: trunk/pyjsl/lint.py
===================================================================
--- trunk/pyjsl/lint.py 2008-08-23 22:24:59 UTC (rev 211)
+++ trunk/pyjsl/lint.py 2008-08-23 22:32:48 UTC (rev 212)
@@ -177,7 +177,10 @@
parse_errors = []
root = jsparse.parse(script, parse_error)
- comments = jsparse.parsecomments(script, root)
+ if root:
+ comments = jsparse.parsecomments(script, root)
+ else:
+ comments = []
ignores = []
start_ignore = None
declares = []
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|