Skip to content

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

Merged
merged 6 commits into from
Nov 7, 2018
Merged

Finish implementing char validation #207

merged 6 commits into from
Nov 7, 2018

Conversation

aochagavia
Copy link
Contributor

@aochagavia aochagavia commented Nov 6, 2018

The only thing missing right now are good integration tests (and maybe more descriptive error messages)

}

if code.len() > 6 {
errors.push(SyntaxError::new(OverlongUnicodeEscape, range));
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch!

@aochagavia
Copy link
Contributor Author

I think this is ready to be merged. I could make tests check for expected errors and their range (instead of checking if errors > 0), but I am not sure it is worth the hassle.

@@ -78,3 +80,38 @@ pub(crate) fn validate_block_structure(root: SyntaxNodeRef) {
}
}
}

#[derive(Debug)]
pub struct MutAsciiString<'a> {
Copy link
Member

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?

@aochagavia
Copy link
Contributor Author

bors r+

bors bot added a commit that referenced this pull request Nov 7, 2018
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]>
@bors
Copy link
Contributor

bors bot commented Nov 7, 2018

Canceled

@aochagavia
Copy link
Contributor Author

bors r+

bors bot added a commit that referenced this pull request Nov 7, 2018
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]>
@bors
Copy link
Contributor

bors bot commented Nov 7, 2018

Build succeeded

@bors bors bot merged commit 433a806 into rust-lang:master Nov 7, 2018
@aochagavia aochagavia deleted the char-validation branch November 7, 2018 11:14
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.

3 participants