From 70cf70519c31088477348d927cbc42d72d9e0ab6 Mon Sep 17 00:00:00 2001 From: boatbomber Date: Sat, 20 Nov 2021 15:01:36 -0800 Subject: [PATCH] Account for unicode in strings (#9) --- src/lexer/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lexer/init.lua b/src/lexer/init.lua index 5f2c6c5..59fc286 100644 --- a/src/lexer/init.lua +++ b/src/lexer/init.lua @@ -36,7 +36,7 @@ local OPERATORS = "[:;<>/~%*%(%)%-={},%.#%^%+%%]+" local BRACKETS = "[%[%]]+" -- needs to be separate pattern from other operators or it'll mess up multiline strings local IDEN = "[%a_][%w_]*" local STRING_EMPTY = "(['\"])%1" --Empty String -local STRING_PLAIN = [=[(['"])[%w%p \t\v\b\f\r\a]-([^%\]%1)]=] --TODO: Handle escaping escapes +local STRING_PLAIN = [=[(['"])[^\n]-([^%\]%1)]=] --TODO: Handle escaping escapes local STRING_INCOMP_A = "(['\"]).-\n" --Incompleted String with next line local STRING_INCOMP_B = "(['\"])[^\n]*" --Incompleted String without next line local STRING_MULTI = "%[(=*)%[.-%]%1%]" --Multiline-String