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): def p_error(self, token):
super().p_error(token) super().p_error(token)
if not token:
# End of file
# Maybe it should raise an error ?
return token
while True: while True:
token = self.parser.token() token = self.parser.token()
if not token or token.type == "ENDOFLINE": if not token or token.type == "ENDOFLINE":
break break
if token:
self.parser.errok() self.parser.errok()
return token return token

Loading…
Cancel
Save