Skip to content

Commit

Permalink
chore: emmylua new stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
noaione committed Jun 10, 2024
1 parent 15f358b commit c85c9c9
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 16 deletions.
7 changes: 7 additions & 0 deletions .emmyrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"diagnostics": {
"disable": [
"undefined-global"
],
}
}
21 changes: 12 additions & 9 deletions _doc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ do
---@class NovelStatus
local NovelStatus = {}

---@class ChapterType
---@field protected HTML int @Use HTML parsing for chapter contents
---@field protected STRING int @Use standard string parsing for chapter contents
local ChapterType = {}

---@class Novel @Novel.Listing
local Novel = {}

Expand Down Expand Up @@ -369,15 +374,6 @@ do
---@param chapters ArrayList
---@return void
function NovelInfo:setChapters(chapters) return end

---@class ChapterType
local ChapterType = {}

---@type ChapterType
ChapterType.STRING = {}

---@type ChapterType
ChapterType.HTML = {}
end

-- ShosetsuLib
Expand Down Expand Up @@ -445,6 +441,13 @@ do
---@param f function @Function to wrap
---@return function @Wrapper
function wrap(o, f) return end

--- Flatten a table of tables into a single table.
---@see ArrayList
---@param o table @Target
---@param f fun(v: any|Element): any
---@return table
function flatten(o, f) return end
end

-- ArrayList
Expand Down
2 changes: 1 addition & 1 deletion lib/XMLLua/Handler/DOM.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local function init()
}
end

--- @module Handler to generate a DOM-like node tree structure with
-- @module Handler to generate a DOM-like node tree structure with
-- a single ROOT node parent - each node is a table comprising
-- the fields below.
--
Expand Down
6 changes: 3 additions & 3 deletions lib/XMLLua/Handler/Print.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-- {"ver":"1.6.1","author":"manoelcampos"}

---@module Handler to generate a simple event trace which
--outputs messages to the terminal during the XML
--parsing, usually for debugging purposes.
-- @module Handler to generate a simple event trace which
-- outputs messages to the terminal during the XML
-- parsing, usually for debugging purposes.
--
-- License:
-- ========
Expand Down
2 changes: 1 addition & 1 deletion lib/XMLLua/Handler/Tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local function init()
return obj
end

--- @module XML Tree Handler.
-- @module XML Tree Handler.
-- Generates a lua table from an XML content string.
-- It is a simplified handler which attempts
-- to generate a more 'natural' table based structure which
Expand Down
2 changes: 1 addition & 1 deletion lib/XMLLua/Parser.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- {"ver":"1.6.1","author":"manoelcampos"}

--- @module Class providing the actual XML parser.
-- @module Class providing the actual XML parser.
-- Available options are:
-- * stripWS
-- Strip non-significant whitespace (leading/trailing)
Expand Down
2 changes: 1 addition & 1 deletion lib/XMLLua/xml2lua.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- {"ver":"1.6.1","author":"manoelcampos"}

--- @module Module providing a non-validating XML stream parser in Lua.
-- @module Module providing a non-validating XML stream parser in Lua.
--
-- Features:
-- =========
Expand Down

0 comments on commit c85c9c9

Please sign in to comment.