33
44local lexer = require (" fusion.core.lexer" )
55local lfs = require (" lfs" )
6- local unpack = unpack or table.unpack -- luacheck: ignore 113
6+ local unpack = unpack or table.unpack -- luacheck: ignore 113 143
77
88local parser = {}
99local handlers = {}
@@ -663,14 +663,14 @@ function parser.search_for(module_name)
663663 local module_path = module_name :gsub (" %." , " /" )
664664
665665 local file_path
666- for _ , path in ipairs (package .fusepath_t ) do
666+ for _ , path in ipairs (package .fusepath_t ) do -- luacheck: ignore 143
667667 file_path = path :gsub (" ?" , module_path )
668668 if lfs .attributes (file_path ) then
669669 return function () return parser .do_file (file_path ) end , file_path
670670 end
671671 end
672672 local msg = {}
673- for _ , path in ipairs (package .fusepath_t ) do
673+ for _ , path in ipairs (package .fusepath_t ) do -- luacheck: ignore 143
674674 msg [# msg + 1 ] = (" \t no file %q" ):format (path :gsub (" ?" , module_path ))
675675 end
676676 return " \n " .. table.concat (msg , " \n " )
@@ -681,16 +681,16 @@ end
681681-- @usage parser.inject_loader(); print(require("test_module"))
682682-- -- Attempts to load a FusionScript `test_module` package
683683function parser .inject_loader ()
684- for _ , loader in ipairs (package.loaders or package.searchers ) do
684+ for _ , loader in ipairs (package.loaders or package.searchers ) do -- luacheck: ignore 143
685685 if loader == parser .search_for then
686686 return false
687687 end
688688 end
689- table.insert (package.loaders or package.searchers , 2 , parser .search_for )
689+ table.insert (package.loaders or package.searchers , 2 , parser .search_for ) -- luacheck: ignore 143
690690 return true
691691end
692692
693- if not package .fusepath then
693+ if not package .fusepath then -- luacheck: ignore 143
694694 local paths = {}
695695 for path in package.path :gmatch (" [^;]+" ) do
696696 local match = path :match (" ^(.+)%.lua$" )
@@ -701,8 +701,8 @@ if not package.fusepath then
701701 paths [# paths + 1 ] = match .. " .fuse"
702702 end
703703 end
704- package .fusepath = table.concat (paths , " ;" )
705- package .fusepath_t = paths
704+ package .fusepath = table.concat (paths , " ;" ) -- luacheck: ignore 142
705+ package .fusepath_t = paths -- luacheck: ignore 142
706706end
707707
708708return parser
0 commit comments