Make wmlparser check for emptiness of the tag stack at EOF

This commit is contained in:
Alexander van Gessel 2010-02-16 17:14:54 +01:00
parent 73bdcb5a68
commit db1c51d5e8

View file

@ -653,6 +653,8 @@ class Parser:
while 1:
self.skip_whitespace_and_newlines()
if self.at_end():
if state:
raise Error(self, "Tag stack non-empty (%s) at end of data" % state)
break
c = self.read_next()
if c == "#": # comment or preprocessor