Skip to content

Commit

Permalink
Fixing bug in IsWhole function.
Browse files Browse the repository at this point in the history
  • Loading branch information
EvgSkv committed Jan 24, 2025
1 parent 1cb6af7 commit 505d11b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions parser_py/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 505d11b

Please sign in to comment.