language-lua icon indicating copy to clipboard operation
language-lua copied to clipboard

Quotes inside C blocks passed to ffi.cdef breaks the highlighter

Open JoanCharmant opened this issue 9 years ago • 0 comments

This seems to only happen if the quote is inside a C block scope itself.

The quote is interpreted as opening a new string and the rest of the file is highlighted as a string, even after the call to ffi.cdef ends.

Here is a snippet that should reproduce the issue:

ffi.cdef [[ 
int i = 42; // ' this one is OK.
enum test
{
    FOO, // ' this one is KO.
    BAR
};
]]

local baz

Ideally the quote should be ignored as it's inside the multiline string.

JoanCharmant avatar Sep 02 '16 19:09 JoanCharmant