Skip to content

Conversation

@Anaminus
Copy link

This change modifies the "varlist" function so that it will parse a ... operator that occurs at the end of the variable list. Since varlist is used in multiple contexts, a "funcArgs" argument is added to enforce whether the operator should be parsed.

This change also removes trailing whitespace present in minify.lua.

@n1tehawk
Copy link

n1tehawk commented Aug 14, 2017

Commit 1b5254f addresses only part of the problem:

  • It still fails if the argument list starts with ..., i.e. the function has only varargs.
  • It doesn't prevent the ... "ID" from being localized later, meaning that the vararg symbol gets replaced with an actual identifier. This turns the minified function into a non-vararg one, subsequently causing Lua to choke on any usage of ... within the function body.

I've attempted to correct these issues in #2.

Regards, NiteHawk

@Anaminus
Copy link
Author

I agree. Closing.

@Anaminus Anaminus closed this Aug 29, 2017
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

Successfully merging this pull request may close these issues.

2 participants