I have the set.lua file with the following code.
local Set = {} --module
local mt = {} --metatable
setmetatable(_G,{__index=function(t,k) return k end})
--some functions
return Set
The above command is required as I want to treat entries in lua table as strings for some reason. Here is the reference https://stackoverflow.com/questions/61107010/how-to-treat-entries-in-lua-table-as-strings# Then there is sty file with the code.
\ProvidesPackage{luaset}[2020/04/10]
\RequirePackage{luacode}
\begin{luacode*}
local st = require "set"
--some functions
\end{luacode*}
%some commands
\endinput
The tex file has the following code.
\documentclass{article}
\usepackage{luaset}
\begin{document}
abcdefg
\end{document}
Everything works as expected except for one strange fact that tex file is not accepting words of length greater than 7. It has nothing to do with commands in lua file. It is any word in tex file. For example if I type abcdefgh in tex file it doesn't get compiled, whereas the above file gets compiled.