MCPcopy Create free account
hub / github.com/F-Stack/f-stack / getbinopr

Function getbinopr

freebsd/contrib/openzfs/module/lua/lparser.c:1001–1020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

999
1000
1001static BinOpr getbinopr (int op) {
1002 switch (op) {
1003 case '+': return OPR_ADD;
1004 case '-': return OPR_SUB;
1005 case '*': return OPR_MUL;
1006 case '/': return OPR_DIV;
1007 case '%': return OPR_MOD;
1008 case '^': return OPR_POW;
1009 case TK_CONCAT: return OPR_CONCAT;
1010 case TK_NE: return OPR_NE;
1011 case TK_EQ: return OPR_EQ;
1012 case '<': return OPR_LT;
1013 case TK_LE: return OPR_LE;
1014 case '>': return OPR_GT;
1015 case TK_GE: return OPR_GE;
1016 case TK_AND: return OPR_AND;
1017 case TK_OR: return OPR_OR;
1018 default: return OPR_NOBINOPR;
1019 }
1020}
1021
1022
1023static const struct {

Callers 1

subexprFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected