Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser #455

Merged
merged 223 commits into from
Oct 1, 2024
Merged

Parser #455

merged 223 commits into from
Oct 1, 2024

Conversation

matzemathics
Copy link
Collaborator

@matzemathics matzemathics commented Mar 13, 2024

Closes #466.
Closes #465.
Closes #447.
Closes #443.
Closes #346.
Closes #219.
Closes #539.
Closes #522.

@matzemathics matzemathics marked this pull request as draft March 13, 2024 09:59
Comment on lines 2447 to 2448
// SAFETY: The concatenation of strings is okay, because they originated from the same source string.
// The raw offset is okay, because the offset of another span is used.
Copy link
Member

Choose a reason for hiding this comment

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

pretty sure this is unsound, since the requirement that the two spans are from the same allocation is not actually enforced anywhere. As such, combine_spans should itself be unsafe.

@matzemathics matzemathics changed the base branch from data-model to main April 10, 2024 08:37
@@ -166,6 +222,7 @@ impl std::fmt::Display for TokenKind {
TokenKind::PrefixIdent => write!(f, "PrefixIdent"),
TokenKind::Illegal => write!(f, "Illegal"),
TokenKind::Eof => write!(f, "Eof"),
TokenKind::Error => write!(f, "\x1b[1;31mError\x1b[0m"),
Copy link
Member

@mmarx mmarx May 15, 2024

Choose a reason for hiding this comment

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

Please don't use raw escape sequences, and also don't colour unconditionally. In nemo-cli we already use colored::Colorize for this, which handles, e.g., the NO_COLOR environment variable and terminal capabilities.

Copy link
Member

@aannleax aannleax left a comment

Choose a reason for hiding this comment

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

Should be ready to merge now

@aannleax aannleax merged commit 3bdecc9 into main Oct 1, 2024
8 checks passed
@aannleax aannleax deleted the parser branch October 1, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment