Browse Source

Only skip the erro if the end of the file wasn't reached

pull/172/head
Oliverpool 9 years ago
parent
commit
db1a19a873
  1. 5
      patacrep/songs/chordpro/syntax.py

5
patacrep/songs/chordpro/syntax.py

@ -303,14 +303,11 @@ class ChordproParser(Parser):
def p_error(self, token):
super().p_error(token)
if not token:
# End of file
# Maybe it should raise an error ?
return token
while True:
token = self.parser.token()
if not token or token.type == "ENDOFLINE":
break
if token:
self.parser.errok()
return token

Loading…
Cancel
Save