-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
nemo/src/io/parser.rs
Outdated
// 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. |
There was a problem hiding this comment.
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
.
nemo/src/io/lexer.rs
Outdated
@@ -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"), |
There was a problem hiding this comment.
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.
…rals into NegativeAtom
There was a problem hiding this 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
Closes #466.
Closes #465.
Closes #447.
Closes #443.
Closes #346.
Closes #219.
Closes #539.
Closes #522.