-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
marked-yaml currently uses the following type for spans:
pub struct Span {
start: Option<Marker>,
end: Option<Marker>,
}Span::new_blank() says:
Sometimes we simply do not know where information came from (for example if it was created by software) and in that case we can create a blank span.
In my use case I'm however only ever using marked-yaml to parse YAML provided from the user, so the spans can always be known, yet the API currently forces me to litter my code with .unwrap(), which is rather awkward. I think a much more elegant way of modelling software-generated nodes would be to simply use a different source index for their markers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels