handling of strings was borked
This commit is contained in:
parent
684b5f350e
commit
acaa57c6b6
|
@ -44,9 +44,9 @@ local NUMBER4 = '^%d+%.?%d*[eE][%+%-]?%d+'
|
|||
local NUMBER5 = '^%d+%.?%d*'
|
||||
local IDEN = '^[%a_][%w_]*'
|
||||
local WSPACE = '^%s+'
|
||||
local STRING1 = "^'.-[^\\]'"
|
||||
local STRING2 = '^".-[^\\]"'
|
||||
local STRING3 = '^[\'"][\'"]'
|
||||
local STRING1 = [[^'.-[^\\]']]
|
||||
local STRING2 = [[^".-[^\\]"]]
|
||||
local STRING3 = "^((['\"])%2)" -- empty string
|
||||
local PREPRO = '^#.-[^\\]\n'
|
||||
|
||||
local plain_matches,lua_matches,cpp_matches,lua_keyword,cpp_keyword
|
||||
|
@ -306,14 +306,15 @@ function lexer.lua(s,filter,options)
|
|||
{STRING3,sdump},
|
||||
{STRING1,sdump},
|
||||
{STRING2,sdump},
|
||||
{'^%-%-%[%[.-%]%]',cdump},
|
||||
{'^%-%-.-\n',cdump},
|
||||
{'^%[%[.+%]%]',sdump_l},
|
||||
{'^%-%-%[%[.+%]%]',cdump},
|
||||
{'^%[%[.-%]%]',sdump_l},
|
||||
{'^==',tdump},
|
||||
{'^~=',tdump},
|
||||
{'^<=',tdump},
|
||||
{'^>=',tdump},
|
||||
{'^%.%.%.',tdump},
|
||||
{'^%.%.',tdump},
|
||||
{'^.',tdump}
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue