Skip to content

Commit

Permalink
Account for unicode in strings (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
boatbomber authored Nov 20, 2021
1 parent 347b9d4 commit 70cf705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lexer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70cf705

Please sign in to comment.