[javascriptlint-commit] SF.net SVN: javascriptlint: [190] trunk/pyjsl/jsparse.py
Status: Beta
Brought to you by:
matthiasmiller
From: <mat...@us...> - 2008-04-15 14:15:08
|
Revision: 190 http://javascriptlint.svn.sourceforge.net/javascriptlint/?rev=190&view=rev Author: matthiasmiller Date: 2008-04-15 07:14:52 -0700 (Tue, 15 Apr 2008) Log Message: ----------- interface jsparse.is_compilable_unit Modified Paths: -------------- trunk/pyjsl/jsparse.py Modified: trunk/pyjsl/jsparse.py =================================================================== --- trunk/pyjsl/jsparse.py 2008-04-03 20:39:28 UTC (rev 189) +++ trunk/pyjsl/jsparse.py 2008-04-15 14:14:52 UTC (rev 190) @@ -220,6 +220,9 @@ comments = _parse_comments(script, root_node, positions, comment_ignore_ranges) return root_node, comments +def is_compilable_unit(script): + return pyspidermonkey.is_compilable_unit(script) + def _dump_node(node, depth=0): print '. '*depth, if node is None: @@ -325,9 +328,8 @@ ('re = /.*', False), ('{ // missing curly', False) ) - for text, is_compilable_unit in tests: - self.assertEquals(pyspidermonkey.is_compilable_unit(text), - is_compilable_unit) + for text, result in tests: + self.assertEquals(is_compilable_unit(text), result) if __name__ == '__main__': unittest.main() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |