[PR #66] [MERGED] fix: Unexpected token QuotedString#65 #65

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

📋 Pull Request Information

Original PR: https://github.com/tufanbarisyildirim/gonginx/pull/66
Author: @mofantor
Created: 2/23/2025
Status: Merged
Merged: 2/25/2025
Merged by: @tufanbarisyildirim

Base: masterHead: fix/#65Unexpected_token_QuotedString


📝 Commits (2)

📊 Changes

5 files changed (+117 additions, -83 deletions)

View changed files

📝 config/location.go (+2 -0)
📝 config/statement.go (+9 -6)
📝 dumper/dumper.go (+25 -11)
📝 parser/parser.go (+58 -61)
📝 parser/parser_test.go (+23 -5)

📄 Description

Problem Analysis:

Comments can appear on any line, including within multi-line directives. The parser must correctly handle inline comments that appear within multi-line configurations.

Fix:

Modified the InLineComment structure and logic to ensure that all functionalities of inline comments are properly handled. Specifically, this includes tracking the line numbers of inline comments so that they can be accurately output during configuration formatting.

This fix addresses the issue where the parser was failing to handle quoted strings followed by inline comments in multi-line directives, as described in issue #65.


🔄 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/66 **Author:** [@mofantor](https://github.com/mofantor) **Created:** 2/23/2025 **Status:** ✅ Merged **Merged:** 2/25/2025 **Merged by:** [@tufanbarisyildirim](https://github.com/tufanbarisyildirim) **Base:** `master` ← **Head:** `fix/#65Unexpected_token_QuotedString` --- ### 📝 Commits (2) - [`09ea035`](https://github.com/tufanbarisyildirim/gonginx/commit/09ea035b224e758ecd19477dc69e40f3bfb21654) fix: QuotedString_ISSUE65 - [`5937f69`](https://github.com/tufanbarisyildirim/gonginx/commit/5937f69095ba4d312042323e584a26b56181430b) update comment ### 📊 Changes **5 files changed** (+117 additions, -83 deletions) <details> <summary>View changed files</summary> 📝 `config/location.go` (+2 -0) 📝 `config/statement.go` (+9 -6) 📝 `dumper/dumper.go` (+25 -11) 📝 `parser/parser.go` (+58 -61) 📝 `parser/parser_test.go` (+23 -5) </details> ### 📄 Description ### Problem Analysis: Comments can appear on any line, including within multi-line directives. The parser must correctly handle inline comments that appear within multi-line configurations. ### Fix: Modified the `InLineComment` structure and logic to ensure that all functionalities of inline comments are properly handled. Specifically, this includes tracking the line numbers of inline comments so that they can be accurately output during configuration formatting. This fix addresses the issue where the parser was failing to handle quoted strings followed by inline comments in multi-line directives, as described in issue #65. --- <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:45 +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#65
No description provided.