Replies: 3 comments 1 reply
-
Thanks for starting a conversation. Is there code to look at that could be shared here?
Ultimately it will end up in |
Beta Was this translation helpful? Give feedback.
-
About the callback parser. I finally figured it out. You mean like XML-Parsers which use Visitor Pattern + Callback?
Probably export a trait which needs to be implemented by |
Beta Was this translation helpful? Give feedback.
-
That's correct.
Did you mean to say that you do think it's a good match? Just because you are proposing to implement exactly that using a trait and started working on this. I do recommend to share results in a draft PR early for feedback or alternatively implement it in your crate first the way you prefer it and we can migrate it. The reason is that |
Beta Was this translation helpful? Give feedback.
-
The goal of this issue is to implement parsing git revisions, according to
gitrevisions(7). Parsing
of ranges is not a goal of this issue, but the first step. See also #XXX.
To piggy back on the reply from @Byron from here.
Ok, but the main interaction point for the user of the library would still be
Repository::rev_parse()
?Ok, I can adjust that.
I'am not sure I understand what you mean. My approach does not parse into a
data structure. It works like this (no ranges support):
@{
→parse_with_at()
([<refname>]@{reflog}
spec NIY):/
→search_by_regex()
(NIY)<rev><nav>*<special>?
where<rev>
is SHA1, refname, HEAD or@
<nav>
is the^
or~
operator followed by an optional number<special>
is a type filter{tree}
, a peel tag command{}
or a regex `{/regex}'<rev>
,<nav>
&<special>
parts.<rev>
toId
<nav>
not empty navigate<specials>
NIYBeta Was this translation helpful? Give feedback.
All reactions