diff -r 61085789b12b -r 2b6416334a25 uglify/llex.lua --- a/uglify/llex.lua Fri Mar 17 11:01:19 2023 +0000 +++ b/uglify/llex.lua Fri Mar 17 11:02:12 2023 +0000 @@ -27,7 +27,7 @@ local base = _G local string = require "string" -module "llex" +--module "llex" local find = string.find local match = string.match @@ -47,11 +47,14 @@ -- NOTE: see init() for module variables (externally visible): -- tok, seminfo, tokln -local z, -- source stream - sourceid, -- name of source - I, -- position of lexer - buff, -- buffer for strings - ln -- line number + local z = '', -- source + sourceid = '', -- name of source + I = 1, -- lexer's position in source + buff = '', + ln = 1, -- line number + tok = {}, -- lexed token list* + seminfo = {}, -- lexed semantic information list* + tokln = {}, -- line numbers for messages* ---------------------------------------------------------------------- -- add information to token listing @@ -352,4 +355,7 @@ end--while outer end -return _M +return { +init = init, +llex = llex +}