feat(targets): complex targets sets expressions #10

Merged
rlahfa merged 1 commit from target-set-expressions into main 2024-12-23 23:57:56 +01:00
Member

allows intersection and complementary

Il faut ptet changer quelque commentaire de docs, pas fait attention

allows intersection and complementary Il faut ptet changer quelque commentaire de docs, pas fait attention
lbailly added 1 commit 2024-12-23 22:53:02 +01:00
allows intersection and complementary
rlahfa changed title from feat(targets): complexe targets sets expressions to feat(targets): complex targets sets expressions 2024-12-23 22:54:53 +01:00
lbailly force-pushed target-set-expressions from 2b7bd80249 to 19ada5dca3 2024-12-23 23:29:30 +01:00 Compare
rlahfa reviewed 2024-12-23 23:32:15 +01:00
@ -53,7 +57,168 @@ impl FromStr for NodeFilter {
}
}
fn end_delimiter(c: char) -> bool {
Owner

shouldn't this be #[inline] ?

shouldn't this be `#[inline]` ?
lbailly marked this conversation as resolved
rlahfa reviewed 2024-12-23 23:33:00 +01:00
@ -57,0 +124,4 @@
Ok((
interior,
unparsed.strip_prefix(')').ok_or(ColmenaError::Unknown {
message: format!("Expected a closing parenthese at {:?}.", unparsed),
Owner

parenthesis

parenthesis
lbailly marked this conversation as resolved
rlahfa reviewed 2024-12-23 23:34:05 +01:00
@ -57,0 +202,4 @@
/// Parses the intersection operations between unions.
///
/// It returns the unparsed text that follows
fn parse_op2(beg: Self, unparsed: &str) -> ColmenaResult<(Self, &str)> {
Owner

why beg is not self ?

why `beg` is not `self` ?
Owner

what is beg actually?

what is `beg` actually?
Author
Member

why beg is not self ?

I prefer not to see parse_op{1,2} as a member function of NodeFilter because it part of parsing operations

what is beg actually?

Discussed a bit bellow, but an accumulator in fact, renamed to acc

> why `beg` is not `self` ? I prefer not to see `parse_op{1,2}` as a member function of `NodeFilter` because it part of parsing operations > what is `beg` actually? Discussed a bit bellow, but an accumulator in fact, renamed to `acc`
lbailly marked this conversation as resolved
rlahfa approved these changes 2024-12-23 23:35:03 +01:00
Dismissed
rlahfa left a comment
Owner

Sounds good to me! I just have a question on what is beg, but the rest is perfectly readable.

Sounds good to me! I just have a question on what is `beg`, but the rest is perfectly readable.
Author
Member

in parse_op{1,2} the first argument beg is the parsed expression before the union/intersection we are parsing, it is modified if there is the corresponding operation in the unparsed str :
parse_op1(parse_expr2("a"), ",b,c") will do a call equivalent to parse_op1(parse_expr2("a,b"), ",c")
maybe I should more call it acc...

in `parse_op{1,2}` the first argument `beg` is the parsed expression before the union/intersection we are parsing, it is modified if there is the corresponding operation in the unparsed str : `parse_op1(parse_expr2("a"), ",b,c")` will do a call equivalent to `parse_op1(parse_expr2("a,b"), ",c")` maybe I should more call it `acc`...
lbailly force-pushed target-set-expressions from 19ada5dca3 to f1e99afd14 2024-12-23 23:47:03 +01:00 Compare
lbailly force-pushed target-set-expressions from f1e99afd14 to f28359373f 2024-12-23 23:47:48 +01:00 Compare
rlahfa approved these changes 2024-12-23 23:57:50 +01:00
rlahfa merged commit f28359373f into main 2024-12-23 23:57:56 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: DGNum/colmena#10
No description provided.