Skip to content

Remove goto for lua5.1 support#3

Open
PlumBlossomMaid wants to merge 1 commit intoTRIGONIM:mainfrom
PlumBlossomMaid:main
Open

Remove goto for lua5.1 support#3
PlumBlossomMaid wants to merge 1 commit intoTRIGONIM:mainfrom
PlumBlossomMaid:main

Conversation

@PlumBlossomMaid
Copy link
Copy Markdown

fix: replace goto with repeat-break for Lua 5.1 compatibility

  • Lua 5.1 does not support the goto keyword introduced in Lua 5.2
  • Replaced goto continue + ::continue:: pattern with repeat ... break ... until true
  • This allows lua-express to run on Lua 5.1 without any syntax errors
  • No functional changes, all original comments preserved

Modified files:

  • express/router/init.lua (while loop in handle method)
  • express/misc/path.lua (normalizeArray function and resolve function loop)

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.

1 participant