Skip to content

Fix character literal not storing its contents#106

Merged
alaviss merged 5 commits intoalaviss:mainfrom
ire4ever1190:fix/char-literal
Jan 11, 2026
Merged

Fix character literal not storing its contents#106
alaviss merged 5 commits intoalaviss:mainfrom
ire4ever1190:fix/char-literal

Conversation

@ire4ever1190
Copy link
Contributor

The character literal was only storing its contents in a node when it was an escape sequence. Was writing a formatter with topiary but was running into issues with characters since their contents would get lost e.g.

discard '?'
discard '\n'
discard "hello"
[2026-01-01T00:52:38Z ERROR topiary::error] Cause:   × Parsing error between line 0, column 0 and line 0, column 10
       ╭─[standard input:1:1]
     1 │ discard ''
       · ─────┬─────
       ·      ╰── (ERROR) node
     2 │ discard '\n'
     3 │ discard "hello"
       ╰────

Copy link
Owner

@alaviss alaviss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for contributing!

@alaviss alaviss enabled auto-merge (squash) January 11, 2026 22:17
@alaviss alaviss merged commit 9b4ede2 into alaviss:main Jan 11, 2026
5 checks passed
@ire4ever1190 ire4ever1190 deleted the fix/char-literal branch January 12, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants