mirror of
https://github.com/tufanbarisyildirim/gonginx.git
synced 2026-04-27 00:35:51 +03:00
[PR #68] [MERGED] enhance: lua code parse and format dump #69
Labels
No labels
bug
enhancement
good first issue
pull-request
question
v2
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gonginx#69
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/tufanbarisyildirim/gonginx/pull/68
Author: @0xJacky
Created: 4/15/2025
Status: ✅ Merged
Merged: 4/29/2025
Merged by: @tufanbarisyildirim
Base:
master← Head:master📝 Commits (4)
af8a79benhance: lua code parse and dumpd0874dbenhance: improve variable reference handling in lexerd120448chore: update Go version to 1.24 and adjust workflow for Ubuntu 24.043587724chore(go): return to v1.22📊 Changes
13 files changed (+633 additions, -41 deletions)
View changed files
📝
.github/workflows/check.yml(+2 -2)📝
.gitignore(+2 -0)📝
config/lua_block.go(+6 -4)📝
dumper/dumper.go(+2 -11)➕
dumper/lua.go(+63 -0)📝
go.mod(+10 -3)📝
go.sum(+303 -0)📝
parser/lexer.go(+52 -11)📝
parser/lexer_test.go(+28 -0)📝
parser/parser.go(+54 -4)📝
parser/parser_test.go(+76 -6)📝
parser/token/token.go(+3 -0)➕
testdata/issues/20.conf(+32 -0)📄 Description
Fixed #20, #26.
This PR introduces Lua code parsing and formatting capabilities by integrating imega/luaformatter. The implementation addresses comment positioning through line break detection for lua code and ensures stable output through multiple serialization cycles.
Key Changes:
EndOfLinetoken type for lua comment line handlingSample Formatting:
Verification:
Original Content:
Parse and formatted content:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.