MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / term

Function term

extern/tinyexpr/tinyexpr.c:472–484  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470
471
472static te_expr *term(state *s) {
473 /* <term> = <factor> {("*" | "/" | "%") <factor>} */
474 te_expr *ret = factor(s);
475
476 while (s->type == TOK_INFIX && (s->function == mul || s->function == divide || s->function == fmod)) {
477 te_fun2 t = s->function;
478 next_token(s);
479 ret = NEW_EXPR(TE_FUNCTION2 | TE_FLAG_PURE, ret, factor(s));
480 ret->function = t;
481 }
482
483 return ret;
484}
485
486
487static te_expr *expr(state *s) {

Callers 1

exprFunction · 0.85

Calls 2

factorFunction · 0.85
next_tokenFunction · 0.85

Tested by

no test coverage detected