fix the case where the first statement in a file is empty (just a semicolon). Fix provided by Andreas Kloeckner
diff --git a/tests/test_c_parser.py b/tests/test_c_parser.py
index 1abf1cb..f14d542 100644
--- a/tests/test_c_parser.py
+++ b/tests/test_c_parser.py
@@ -113,6 +113,10 @@
self.failUnless(isinstance(t2, FileAST))
self.assertEqual(len(t2.ext), 0)
+ # First statement empty
+ t = self.parse('; char c;')
+ self.assertEqual(len(t.ext), 1)
+
def test_empty_toplevel_decl(self):
code = 'int foo;;'
t = self.parse(code)