MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / parseParenExpr

Method parseParenExpr

src/sys/expressionparser.cxx:437–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437FieldGeneratorPtr ExpressionParser::parseParenExpr(LexInfo& lex) const {
438 lex.nextToken(); // eat '('
439
440 FieldGeneratorPtr g = parseExpression(lex);
441
442 if ((lex.curtok != ')') && (lex.curtok != ']')) {
443 throw ParseException("Expecting ')' or ']' but got curtok={:d} ({:c})",
444 static_cast<int>(lex.curtok), static_cast<char>(lex.curtok));
445 }
446
447 lex.nextToken(); // eat ')'
448 return g;
449}
450
451// This will return a pointer to a FieldContext.
452FieldGeneratorPtr ExpressionParser::parseContextExpr(LexInfo& lex) const {

Callers

nothing calls this directly

Calls 2

parseExpressionFunction · 0.85
nextTokenMethod · 0.80

Tested by

no test coverage detected