Warn that [frame] directly witin [attack] can't be lifted.

This commit is contained in:
Eric S. Raymond 2007-10-01 23:49:31 +00:00
parent 418de8a3e6
commit 6d8b8be578

View file

@ -493,6 +493,8 @@ def validate_stack(stack, filename, lineno):
ancestors = map(lambda x: x[0], tagstack)
if tag == "sound" and "attack" in ancestors:
print '"%s", line %d: deprecated [sound] within [attack] tag' % (filename, lineno+1)
if tag == 'frame' and ancestors[-2] == 'attack':
print '"%s", line %d: cannot lift [frame] directly within [attack] tag' % (filename, lineno+1)
def validate_on_pop(tagstack, closer, filename, lineno):
"Validate the stack at the time a new close tag is seen."