Minor pickiness

Even if the last char is a backslash, if we're inside a double quoted string, report unterminated string on EOF.
This commit is contained in:
Sei Lisa 2019-01-05 00:09:50 +01:00
parent 054539adf9
commit 40cd88e9f7

View file

@ -99,7 +99,7 @@ def parseArgs(s):
State = Space
args.append(arg)
arg = ''
# else remain in state Space
# else remain in the 'Space' state
elif c == '\n':
break
else:
@ -129,9 +129,9 @@ def parseArgs(s):
else:
arg += c
if State in (SQuote, DQuote):
if State in (SQuote, DQuote, DQBackslash):
raise EArgError(u"Unterminated string in .run file")
if State in (SBackslash, NBackslash, DQBackslash):
if State in (SBackslash, NBackslash):
raise EArgError(u"Backslash before EOF in .run file")
if State == Normal: