From 4414534866d11ea371eb93b15d8d6dc80ff3b762 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 17 Nov 2018 16:36:41 +0100 Subject: [PATCH] Allow escaping quotes in string --- Upsilon/Parser/Lexer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Upsilon/Parser/Lexer.cs b/Upsilon/Parser/Lexer.cs index 4e9b1fb..e9a3531 100644 --- a/Upsilon/Parser/Lexer.cs +++ b/Upsilon/Parser/Lexer.cs @@ -144,6 +144,11 @@ namespace Upsilon.Parser while (_position < _text.Length) { _position++; + if (Current == '\\' && Next == '"') + { + sb.Append("\""); + _position += 2; + } if (Current == '"') break; sb.Append(Current);