handling of strings was borked

This commit is contained in:
steve donovan 2011-07-08 16:00:21 +02:00
parent 684b5f350e
commit acaa57c6b6
1 changed files with 6 additions and 5 deletions

View File

@ -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