diff options
| -rw-r--r-- | lexer.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -126,7 +126,15 @@ def get_string(data, line): while data[counter] != '"': if data[counter] == "\n": offset += 1 - string += data[counter] + + # look ahead to see if it's a double quote + if data[counter] == "\\" and \ + len(data) > counter and \ + data[counter+1] == '"': + string += '"' + counter += 1 + else: + string += data[counter] counter += 1 if counter >= len(data): raise Exception("couldn't parse string") |
