| 612 | } |
| 613 | |
| 614 | char ExprParser::append(std::vector<Interpreter::Type_Code>& code) |
| 615 | { |
| 616 | if (mOperands.empty() && mOperators.empty()) |
| 617 | { |
| 618 | getErrorHandler().error("Missing expression", mTokenLoc); |
| 619 | return 'l'; |
| 620 | } |
| 621 | |
| 622 | if (mNextOperand || mOperands.empty()) |
| 623 | { |
| 624 | getErrorHandler().error("Syntax error in expression", mTokenLoc); |
| 625 | return 'l'; |
| 626 | } |
| 627 | |
| 628 | while (!mOperators.empty()) |
| 629 | pop(); |
| 630 | |
| 631 | std::copy(mCode.begin(), mCode.end(), std::back_inserter(code)); |
| 632 | |
| 633 | assert(mOperands.size() == 1); |
| 634 | return mOperands[0]; |
| 635 | } |
| 636 | |
| 637 | int ExprParser::parseArguments(const std::string& arguments, Scanner& scanner, |
| 638 | std::vector<Interpreter::Type_Code>& code, int ignoreKeyword, bool expectNames) |
no test coverage detected