mirror of
https://github.com/corn-config/corn.git
synced 2026-07-11 05:16:10 +01:00
[GH-ISSUE #36] Inline Comments? #13
Labels
No labels
bug
bug
documentation
enhancement
enhancement
pull-request
tooling
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
corn-config/corn#13
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?
Originally created by @zyansheep on GitHub (Feb 16, 2025).
Original GitHub issue: https://github.com/corn-config/corn/issues/36
It would be nice to have inline comments I think.
Something like:
Any thoughts?
@JakeStanger commented on GitHub (Mar 5, 2025):
I've given it some thought, and yes I think this would be good to have.
@rdin777 commented on GitHub (Dec 17, 2025):
Subject: Analysis of existing COMMENT rule in grammar.pest
"Hi everyone!
I've been looking into this issue and noticed that the src/grammar.pest file already contains a COMMENT rule: COMMENT = _{ "//" ~ (!"\n" ~ ANY)* }.
In the Pest parser, WHITESPACE and COMMENT rules are typically implicit between other rules. However, I’d like to clarify a few points to better understand the current blocker:
Inline Behavior: Does the current implementation fail when a comment is placed on the same line as a value (e.g., key = "value" // comment)?
Atomic Rules: Are there any specific atomic rules (like strings or paths) where the comment might be interfering or failing to be ignored?
Parser Integration: Is the COMMENT rule correctly handled in the src/parser.rs (or equivalent) when generating the AST, or is it currently being skipped entirely?
I'm interested in helping to fix the implementation if the foundation is already there. Looking forward to your thoughts!"