Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not idempotent #10

Open
daurnimator opened this issue Jan 25, 2016 · 0 comments
Open

Not idempotent #10

daurnimator opened this issue Jan 25, 2016 · 0 comments

Comments

@daurnimator
Copy link

Cleaning up lunadry with lunadry itself, I got something with quite a few changes.
Doing a second attempt, there are just whitespace additions (appear to be at the end of multi-line table constructors).

diff --git a/lunadry.lua b/lunadry.lua
index 1aed887..e1ba96e 100644
--- a/lunadry.lua
+++ b/lunadry.lua
@@ -111,6 +111,7 @@ local function luafilter (...)
           return a == b
         end),

+
     },

     -- comments & whitespace
@@ -298,6 +299,7 @@ local function luafilter (...)

     unop = (C "-" - P "--") + C "#" + C "~" + K "not" * SPACE,

+
   }

   if DEBUG then
@@ -307,11 +309,13 @@ local function luafilter (...)
             ["\n"] = "\\n",
             ["\t"] = "\\t",

+
           }, {
             __index = function (t, c)
               return ("\\x%02X"):format(c:byte())
             end,

+
           }))
     end
     for k, p in pairs(lua) do
@@ -391,26 +395,31 @@ local function main (...)
       "none",
       "d",

+
     },
     {
       "help",
       "none",
       "h",

+
     },
     {
       "in-place",
       "none",
       "i",

+
     },
     {
       "version",
       "none",
       LONGOPT_VERSION,

+
     },

+
   }
   local last = 1
   for r, optarg, optind, li in P.getopt(arg, short, long) do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant