Nice! But yeah, I'm really not happy at all with my day 4 answer. I think the code could be much clearer than what I wrote. But yeah, this is a really excellent opportunity to get some error handling experience. :-)
1
One thing I really need to get on, is naming my captures in my regular expressions. I'm bored with "cap.get(n).ok_or("what, no foo?")?.as_str()......" type stuff :-)
1
1
Also, do you know of any serde type thing where I could annotate a struct with a regexp with named captures of the fields, and have a derived parser for cheap?
1
I don't think you need a proc macro actually! I think just implementing a serde deserialzer would be pretty great!
1
Clever! I decided to hack a direct proc_macro approach and came up with git.gitano.org.uk/parsebyreg⦠which is horrific in all senses, but does work for me, moderately complicatedly. It'd need serious refactorage before it could be primetime though.
1
1


