MCPcopy Create free account
hub / github.com/GJDuck/e9patch / parseMatchOp

Function parseMatchOp

src/e9tool/e9action.cpp:733–797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

731 int prec;
732};
733static const MatchOpInfo *parseMatchOp(int t)
734{
735 switch (t)
736 {
737 case TOKEN_LSHIFT:
738 static const MatchOpInfo info_LSHIFT = {MATCH_OP_LSHIFT, 1};
739 return &info_LSHIFT;
740 case TOKEN_RSHIFT:
741 static const MatchOpInfo info_RSHIFT = {MATCH_OP_RSHIFT, 1};
742 return &info_RSHIFT;
743 case '&':
744 static const MatchOpInfo info_BIT_AND = {MATCH_OP_BIT_AND, 2};
745 return &info_BIT_AND;
746 case '^':
747 static const MatchOpInfo info_BIT_XOR = {MATCH_OP_BIT_XOR, 3};
748 return &info_BIT_XOR;
749 case '|':
750 static const MatchOpInfo info_BIT_OR = {MATCH_OP_BIT_OR, 4};
751 return &info_BIT_OR;
752 case '-':
753 static const MatchOpInfo info_SUB = {MATCH_OP_SUB, 5};
754 return &info_SUB;
755 case '+':
756 static const MatchOpInfo info_ADD = {MATCH_OP_ADD, 5};
757 return &info_ADD;
758 case '*':
759 static const MatchOpInfo info_MUL = {MATCH_OP_MUL, 6};
760 return &info_MUL;
761 case '/': case TOKEN_DIV:
762 static const MatchOpInfo info_DIV = {MATCH_OP_DIV, 6};
763 return &info_DIV;
764 case '%': case TOKEN_MOD:
765 static const MatchOpInfo info_MOD = {MATCH_OP_MOD, 6};
766 return &info_MOD;
767 case TOKEN_IN:
768 static const MatchOpInfo info_IN = {MATCH_OP_IN, 7};
769 return &info_IN;
770 case '<':
771 static const MatchOpInfo info_LT = {MATCH_OP_LT, 8};
772 return &info_LT;
773 case '>':
774 static const MatchOpInfo info_GT = {MATCH_OP_GT, 8};
775 return &info_GT;
776 case TOKEN_LEQ:
777 static const MatchOpInfo info_LEQ = {MATCH_OP_LEQ, 8};
778 return &info_LEQ;
779 case TOKEN_GEQ:
780 static const MatchOpInfo info_GEQ = {MATCH_OP_GEQ, 8};
781 return &info_GEQ;
782 case '=':
783 static const MatchOpInfo info_EQ = {MATCH_OP_EQ, 9};
784 return &info_EQ;
785 case TOKEN_NEQ:
786 static const MatchOpInfo info_NEQ = {MATCH_OP_NEQ, 9};
787 return &info_NEQ;
788 case TOKEN_AND:
789 static const MatchOpInfo info_AND = {MATCH_OP_AND, 11};
790 return &info_AND;

Callers 1

parseMatchExprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected