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

Use Result/Err(()) instead of Option/None to indicate a parse error. #57

Closed
wants to merge 3 commits into from

Conversation

@SimonSapin
Copy link
Member

SimonSapin commented Aug 11, 2014

color.rs Outdated
@@ -33,20 +33,20 @@ pub enum Color {

// Return None on invalid/unsupported value (not a color)

This comment has been minimized.

@Ms2ger

Ms2ger Aug 11, 2014

Contributor

Fix this

nth.rs Outdated
@@ -10,12 +10,12 @@ use ast::*;
/// Parse the An+B notation, as found in the ``:nth-child()`` selector.
/// The input is typically the arguments of a function component value.
/// Return Some((A, B)), or None for a syntax error.

This comment has been minimized.

@Ms2ger

Ms2ger Aug 11, 2014

Contributor

And this

Some(value) => String(value),
None => BadString
Ok(value) => String(value),
Err(()) => BadString
}
}


// Return None on syntax error (ie. unescaped newline)

This comment has been minimized.

@Ms2ger

Ms2ger Aug 11, 2014

Contributor

And this

@SimonSapin
Copy link
Member Author

SimonSapin commented Aug 11, 2014

@SimonSapin SimonSapin closed this Aug 11, 2014
@SimonSapin SimonSapin deleted the result branch Aug 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.