MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / compileComma

Function compileComma

lib/tokenlist.cpp:1453–1466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1451}
1452
1453static void compileComma(Token *&tok, AST_state& state)
1454{
1455 compileAssignTernary(tok, state);
1456 while (tok) {
1457 if (tok->str() == ",") {
1458 if (Token::simpleMatch(tok, ", }"))
1459 tok = tok->next();
1460 else
1461 compileBinOp(tok, state, compileAssignTernary);
1462 } else if (tok->str() == ";" && state.functionCallEndPar && tok->index() < state.functionCallEndPar->index()) {
1463 compileBinOp(tok, state, compileAssignTernary);
1464 } else break;
1465 }
1466}
1467
1468/**
1469 * @throws InternalError thrown if maximum AST depth is exceeded

Callers 1

compileExpressionFunction · 0.85

Calls 5

compileAssignTernaryFunction · 0.85
compileBinOpFunction · 0.85
nextMethod · 0.80
simpleMatchFunction · 0.70
strMethod · 0.45

Tested by

no test coverage detected