Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Commit

Permalink
[Fix] Disabled parsing luadoc comments as it crashes lpeg
Browse files Browse the repository at this point in the history
  • Loading branch information
kapecp committed Jan 10, 2016
1 parent b91002d commit 047b26e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist.info
@@ -1,7 +1,7 @@
--- This dist file is part of LuaDist project

name = "luacomments"
version = "0.2"
version = "0.2.1"

desc = "LuaComments is a Lua comment parser"
author = "Peter Kósa, Peter Kapec"
Expand Down
12 changes: 6 additions & 6 deletions src/comments/init.lua
Expand Up @@ -3,7 +3,7 @@
local re = require("re")

---
-- Module for lua comment parsing.
-- Module for lua comment parsing.
--@class module
--@name comments
--@author Peter Kosa
Expand All @@ -24,8 +24,8 @@ local parsers={
[2]=leg,
[3]=custom,
[4]=explua,
[5]=luadoc,
[6]=ldoc,
[5]=ldoc,
-- [6]=luadoc, -- broken !!! (crash in lpeg.c)

}

Expand Down Expand Up @@ -53,7 +53,7 @@ function Parse(text,parser,extended)
elseif(parser=="leg")then
return leg.parse(text)
else

for k,v in ipairs(parsers) do
result,errno = v.parse(text,extended)
if(result)then
Expand All @@ -75,7 +75,7 @@ function findDocstring(subtree)
local res = findDocstring(v)
if res ~= nil then
return res
end
end
else
if v.key == "COMMENT" and v.parsed.style == "literate" and v.parsed.type == "lp" then
return v.parsed.text
Expand Down Expand Up @@ -145,4 +145,4 @@ function extendAST(ast)
extended_ast = TagAST(ast)
extended_ast = markBlockChildren(extended_ast)
return extended_ast
end
end

0 comments on commit 047b26e

Please sign in to comment.