-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I tried using this but found that multiline comments aren't supported.
I was able to get this working by making these changes to the isComment function:
local function isComment(char)
if (char == "-" and look() == "-") then
local isMultiline = look(1) == "[" and look(2) == "["
posOffset = pos - 1;
start = posOffset;
pos = pos + 1;
while not isEndOfComment(look(), isMultiline) do--isEndOfLine(look()) do
pos = pos + 1;
end;
if (isMultiline) pos = pos + 2
return true;
end;
return false;
end;
Where isEndOfComment is defined as:
local function isEndOfComment(char, isMultiline)
if not isMultiline then
return isEndOfLine(char)
else
return char == "]" and look(1) == "]"
end
end
P.S. thanks for making this!
Zaenalos
Metadata
Metadata
Assignees
Labels
No labels