MCPcopy Create free account
hub / github.com/git/git / compile_pattern_and

Function compile_pattern_and

grep.c:656–675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

654}
655
656static struct grep_expr *compile_pattern_and(struct grep_pat **list)
657{
658 struct grep_pat *p;
659 struct grep_expr *x, *y;
660
661 x = compile_pattern_not(list);
662 p = *list;
663 if (p && p->token == GREP_AND) {
664 if (!x)
665 die("--and not preceded by pattern expression");
666 if (!p->next)
667 die("--and not followed by pattern expression");
668 *list = p->next;
669 y = compile_pattern_and(list);
670 if (!y)
671 die("--and not followed by pattern expression");
672 return grep_and_expr(x, y);
673 }
674 return x;
675}
676
677static struct grep_expr *compile_pattern_or(struct grep_pat **list)
678{

Callers 1

compile_pattern_orFunction · 0.85

Calls 3

compile_pattern_notFunction · 0.85
grep_and_exprFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected