gonginx icon indicating copy to clipboard operation
gonginx copied to clipboard

support openresty xxx_by_lua_block syntax

Open virusdefender opened this issue 4 years ago • 3 comments

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?

virusdefender avatar Jun 20 '21 02:06 virusdefender

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?

tufanbarisyildirim avatar Jul 15 '21 10:07 tufanbarisyildirim

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 avatar Aug 18 '21 06:08 virusdefender

@virusdefender any update with this?

tufanbarisyildirim avatar Mar 01 '22 05:03 tufanbarisyildirim