[PR #23] [MERGED] Implement lua block wrapper #47

Closed
opened 2026-02-28 01:20:41 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tufanbarisyildirim/gonginx/pull/23
Author: @tufanbarisyildirim
Created: 6/27/2023
Status: Merged
Merged: 6/27/2023
Merged by: @tufanbarisyildirim

Base: masterHead: issue-22


📝 Commits (7)

  • dc0e84b simplify comment lexing in lua block
  • 9c6860f implement a more expressive Diff and use this in tests instead of Equal
  • c3905c2 rename the loop label
  • 28a226b add debug mode to the dumper
  • 24b4b16 get code block for literal codeblocks
  • f17b090 implement a lua-block and its own wrapper
  • be65b82 make static check happy

📊 Changes

12 files changed (+229 additions, -26 deletions)

View changed files

📝 block.go (+10 -4)
📝 dumper.go (+29 -0)
📝 http.go (+4 -0)
lua_block.go (+87 -0)
📝 parser/lexer.go (+7 -10)
📝 parser/lexer_test.go (+1 -1)
📝 parser/parser.go (+19 -2)
📝 parser/parser_test.go (+30 -0)
📝 parser/token/token.go (+26 -9)
📝 statement.go (+1 -0)
testdata/issues/22.conf (+11 -0)
📝 upstream.go (+4 -0)

📄 Description

this fixes #22 , additionally,

  • adds ability to have literal codeblocks with no directives inside (anything works like lua block, needs to be improved tho)
  • adds debug mode to the dumper so we can print more expressive config files with debug data in comment lines
  • simlyfies the lua block parsing

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tufanbarisyildirim/gonginx/pull/23 **Author:** [@tufanbarisyildirim](https://github.com/tufanbarisyildirim) **Created:** 6/27/2023 **Status:** ✅ Merged **Merged:** 6/27/2023 **Merged by:** [@tufanbarisyildirim](https://github.com/tufanbarisyildirim) **Base:** `master` ← **Head:** `issue-22` --- ### 📝 Commits (7) - [`dc0e84b`](https://github.com/tufanbarisyildirim/gonginx/commit/dc0e84bcd0402f7ae624dcdbdaaf8764a0f395ae) simplify comment lexing in lua block - [`9c6860f`](https://github.com/tufanbarisyildirim/gonginx/commit/9c6860f3416d1491bc551deb21a7d65d1ef70fe1) implement a more expressive Diff and use this in tests instead of Equal - [`c3905c2`](https://github.com/tufanbarisyildirim/gonginx/commit/c3905c2d0bd6e4e6990e10aafc47328a6e247eb9) rename the loop label - [`28a226b`](https://github.com/tufanbarisyildirim/gonginx/commit/28a226baf38ae66112bc550243e76dfacba4dceb) add debug mode to the dumper - [`24b4b16`](https://github.com/tufanbarisyildirim/gonginx/commit/24b4b16ac727836a81e947582c215d4b3a9b3282) get code block for literal codeblocks - [`f17b090`](https://github.com/tufanbarisyildirim/gonginx/commit/f17b090f4b6d9a10945bf4c5037931e2424ee879) implement a lua-block and its own wrapper - [`be65b82`](https://github.com/tufanbarisyildirim/gonginx/commit/be65b82b9bde5f0f06091ba94b37611b6f0023d7) make static check happy ### 📊 Changes **12 files changed** (+229 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `block.go` (+10 -4) 📝 `dumper.go` (+29 -0) 📝 `http.go` (+4 -0) ➕ `lua_block.go` (+87 -0) 📝 `parser/lexer.go` (+7 -10) 📝 `parser/lexer_test.go` (+1 -1) 📝 `parser/parser.go` (+19 -2) 📝 `parser/parser_test.go` (+30 -0) 📝 `parser/token/token.go` (+26 -9) 📝 `statement.go` (+1 -0) ➕ `testdata/issues/22.conf` (+11 -0) 📝 `upstream.go` (+4 -0) </details> ### 📄 Description this fixes #22 , additionally, - adds ability to have literal codeblocks with no directives inside (anything works like lua block, needs to be improved tho) - adds debug mode to the dumper so we can print more expressive config files with debug data in comment lines - simlyfies the lua block parsing --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 01:20:41 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gonginx#47
No description provided.