musiKk / plyj

A Java parser written in Python using PLY.
Other
150 stars 69 forks source link

fix issue#20: A Crash Bug in TestVisitor testcase #21

Closed simpleton closed 10 years ago

simpleton commented 10 years ago

Interface declare will cause this bug.

Traceback (most recent call last):
  File "testVisitor.py", line 74, in <module>
    tree.accept(MyVisitor())
  File "/Users/sim/github/TAG_obfuscate/model.py", line 53, in accept
    type_decl.accept(visitor)
  File "/Users/sim/github/TAG_obfuscate/model.py", line 106, in accept
    decl.accept(visitor)
  File "/Users/sim/github/TAG_obfuscate/model.py", line 268, in accept
    decl.accept(visitor)
  File "/Users/sim/github/TAG_obfuscate/model.py", line 195, in accept
    for e in self.body:
TypeError: 'NoneType' object is not iterable
musiKk commented 10 years ago

Aw man. I had this already fixed but never pushed. While fixing #22 I pushed it without realizing that you solved it too.

Regardless, many thanks for reporting and sending a pull request! :beer: