| 965 | void interpretAll(const std::string& code, QiVarMap* local = nullptr) |
| 966 | { |
| 967 | if (!initMutex) { ScriptException(ScriptException::error_interpreter_not_init, {}, {}); } |
| 968 | else if (initMutex == INVALID_HANDLE_VALUE) { ScriptException(ScriptException::error_interpreter_exited, {}, {}); } |
| 969 | if (code.empty()) return; |
| 970 | |
| 971 | auto statements = cachedParse<StatementList>(code, 32, 256 * 1024, 64 * 1024, [&] { |
| 972 | std::istringstream codeStream(code); |
| 973 | std::string rawLine; |
| 974 | std::vector<std::string> lines; |
| 975 | while (std::getline(codeStream, rawLine)) |
| 976 | { |
| 977 | std::string current_stmt; |
| 978 | bool in_string = false; |
| 979 | bool escape_next = false; |
| 980 | |
| 981 | for (size_t i = 0; i < rawLine.length(); i++) |
| 982 | { |
| 983 | char c = rawLine[i]; |
| 984 | if (in_string) |
| 985 | { |
| 986 | current_stmt += c; |
| 987 | if (escape_next) escape_next = false; |
| 988 | else |
| 989 | { |
nothing calls this directly
no outgoing calls
no test coverage detected