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

Function compile_pattern_not

grep.c:634–654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632}
633
634static struct grep_expr *compile_pattern_not(struct grep_pat **list)
635{
636 struct grep_pat *p;
637 struct grep_expr *x;
638
639 p = *list;
640 if (!p)
641 return NULL;
642 switch (p->token) {
643 case GREP_NOT:
644 if (!p->next)
645 die("--not not followed by pattern expression");
646 *list = p->next;
647 x = compile_pattern_not(list);
648 if (!x)
649 die("--not followed by non pattern expression");
650 return grep_not_expr(x);
651 default:
652 return compile_pattern_atom(list);
653 }
654}
655
656static struct grep_expr *compile_pattern_and(struct grep_pat **list)
657{

Callers 1

compile_pattern_andFunction · 0.85

Calls 3

grep_not_exprFunction · 0.85
compile_pattern_atomFunction · 0.85
dieFunction · 0.70

Tested by

no test coverage detected