gonginx
gonginx copied to clipboard
support openresty xxx_by_lua_block syntax
https://github.com/openresty/lua-nginx-module
this is only a demo code and proposal about lexing the lua block, do you have any suggestions?
Hey @virusdefender appreciate your contribution!
It seem that it will stop parsing at first closing curly bracket } in lua.
And tests does not do any assertion, can you please fix?
It seem that it will stop parsing at first closing curly bracket } in lua.
I updated the test case, it seems there is no problem.
This pr is only a workaround and it's used to show my idea to solve this problem. It's not fully tested, maybe it should not be merged.
the full support is not easy, according to the openresty source code https://github.com/openresty/lua-nginx-module/blob/1c1bcfeb9276c6dfc9b038a6fa779e7e4b605bc9/src/ngx_http_lua_directive.c#L1344
@virusdefender any update with this?