prometheus-lua / Prometheus

Lua Obfuscator written in pure Lua
https://levno-710.gitbook.io/prometheus/
GNU Affero General Public License v3.0
220 stars 65 forks source link

[BUG] Type annotations #137

Closed ari-party closed 1 year ago

ari-party commented 1 year ago

A client of mine experienced issues obfuscating LuaU. His functions has type annotations in the arguments. (function name(argument: type))

It seems like Prometheus is not picking this up correctly since the error: Parsing Error at Position 254:6920, unexpected token <Symbol> ":", expected <Symbol> ")"

        src/bin/src/logger.lua:57: in function 'logger.error'
        src/bin/src/prometheus/parser.lua:134: in upvalue 'expect'
        src/bin/src/prometheus/parser.lua:287: in function 'prometheus.parser.statement'
        src/bin/src/prometheus/parser.lua:171: in function 'prometheus.parser.block'
        src/bin/src/prometheus/parser.lua:149: in function 'prometheus.parser.parse'
        src/bin/src/prometheus/pipeline.lua:178: in function 'prometheus.pipeline.apply'
        src/bin/src/cli.lua:148: in main chunk
        [C]: in function 'require'
        src/bin/cli.lua:12: in main chunk
        [C]: in ?

pls fix.