diff --git a/parser_py/parse.py b/parser_py/parse.py index 63ac57d..2532fb1 100755 --- a/parser_py/parse.py +++ b/parser_py/parse.py @@ -252,9 +252,10 @@ def RemoveComments(s): def IsWhole(s): """String is 'whole' if all parenthesis match.""" status = 'OK' - for (_, _, status) in Traverse(s): + state = '' + for (_, state, status) in Traverse(s): pass - return status == 'OK' + return status == 'OK' and state == '' def ShowTraverse(s):