Skip to content

One-line error messages from the compiler front end need new-line#363

Merged
robinheghan merged 2 commits intogren-lang:mainfrom
gilramir:add-newline-to-unrecognized-command
Jan 26, 2026
Merged

One-line error messages from the compiler front end need new-line#363
robinheghan merged 2 commits intogren-lang:mainfrom
gilramir:add-newline-to-unrecognized-command

Conversation

@gilramir
Copy link
Contributor

When the gren compiler front end reports a simple one line error message for "I don't recognize this command", it fails to terminate the output with a newline character.

This change adds a new helper function, endErrorWithLine, which uses Stream.Log.line, to avoid changing other existing usages of endErrorWithString.

Before this change, my shell (zsh on Linux), shows the lack of newline:
image

After this change, there's a newline:
image

When the gren compiler front end reports a simple one line
error message for "I don't recognize this command", it fails to
terminate the output with a newline character.

This change adds a new helper function, endErrorWithLine,
which uses Stream.Log.line, to avoid changing other existing
usages of endErrorWithString.
@robinheghan robinheghan merged commit 98ee033 into gren-lang:main Jan 26, 2026
@robinheghan
Copy link
Member

Thank you!

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