-
Notifications
You must be signed in to change notification settings - Fork 14
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
remove dead code & replace remaining parse_ident #180
Conversation
Seems good to me, but since there's quite a few pointer operation stuff, it'll be best to have more eyes on this. |
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.
Pointer stuff looks fine
k += 1 | ||
let q = p.parse_c_ident(); | ||
if q.is_none() { | ||
return Err(()); |
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.
?
operator works too
@@ -737,76 +720,60 @@ unsafe fn spc_handler_html_default(mut spe: *mut spc_env, mut ap: *mut spc_arg) | |||
error | |||
} | |||
/* translate wsp* '(' wsp* number (comma-wsp number)? wsp* ')' */ |
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.
Another piece of code where nom
might make things a lot cleaner. The parse traits would be usable, with some small wrappers that clone the slice pointer, mutate it, subtract the length from the input and return the remainder and output as a nom::IResult
by converting to a basic nom error. Then functions like these would be a few lines long, using nom combinators (except the end bit that mutates, just return the data and use it to mutate elsewhere).
Need a rebase, i think... |
Done. |
Merging~ Thanks~ |
last commit from #177