-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Finish implementing char validation #207
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
Conversation
crates/ra_syntax/src/validation.rs
Outdated
} | ||
|
||
if code.len() > 6 { | ||
errors.push(SyntaxError::new(OverlongUnicodeEscape, range)); |
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 there be a return
here?
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.
Good catch!
I think this is ready to be merged. I could make tests check for expected errors and their range (instead of checking if |
crates/ra_syntax/src/utils.rs
Outdated
@@ -78,3 +80,38 @@ pub(crate) fn validate_block_structure(root: SyntaxNodeRef) { | |||
} | |||
} | |||
} | |||
|
|||
#[derive(Debug)] | |||
pub struct MutAsciiString<'a> { |
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.
Let's use https://crates.io/crates/arrayvec crate instead?
bors r+ |
207: Finish implementing char validation r=aochagavia a=aochagavia The only thing missing right now are good integration tests (and maybe more descriptive error messages) Co-authored-by: Adolfo Ochagavía <[email protected]>
Canceled |
bors r+ |
207: Finish implementing char validation r=aochagavia a=aochagavia The only thing missing right now are good integration tests (and maybe more descriptive error messages) Co-authored-by: Adolfo Ochagavía <[email protected]>
Build succeeded |
The only thing missing right now are good integration tests (and maybe more descriptive error messages)