]> git.lizzy.rs Git - metalua.git/blobdiff - src/lib/metalua/mlc_xcall.lua
pushed in a hurry, alimentation issue on laptop
[metalua.git] / src / lib / metalua / mlc_xcall.lua
index adfe673b6540b1c141a40c237ebc5a7f07d79181..359bedc76a264528df7bb131adae77ac0567c99e 100644 (file)
@@ -22,7 +22,13 @@ function mlc_xcall.server (luafilename, astfilename)
    require 'serialize'
 
    -- compile the content of luafile name in an AST, serialized in astfilename
-   local status, ast = pcall (mlc.luafile_to_ast, luafilename)
+   --local status, ast = pcall (mlc.luafile_to_ast, luafilename)
+   local status, ast
+   local function compile() return mlc.luafile_to_ast (luafilename) end
+   if mlc.metabugs or true then 
+      print 'mlc_xcall.server/metabugs'
+      status, ast = xpcall (compile, debug.traceback)
+   else status, ast = pcall (compile) end
    local out = io.open (astfilename, 'w')
    if status then -- success
       out:write (serialize (ast))