mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
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:
parent
054539adf9
commit
40cd88e9f7
1 changed files with 3 additions and 3 deletions
|
@ -99,7 +99,7 @@ def parseArgs(s):
|
||||||
State = Space
|
State = Space
|
||||||
args.append(arg)
|
args.append(arg)
|
||||||
arg = ''
|
arg = ''
|
||||||
# else remain in state Space
|
# else remain in the 'Space' state
|
||||||
elif c == '\n':
|
elif c == '\n':
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
@ -129,9 +129,9 @@ def parseArgs(s):
|
||||||
else:
|
else:
|
||||||
arg += c
|
arg += c
|
||||||
|
|
||||||
if State in (SQuote, DQuote):
|
if State in (SQuote, DQuote, DQBackslash):
|
||||||
raise EArgError(u"Unterminated string in .run file")
|
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")
|
raise EArgError(u"Backslash before EOF in .run file")
|
||||||
|
|
||||||
if State == Normal:
|
if State == Normal:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue