* @brief Builds the right script engine for a language tag (0=JS, 1=Lua, 2=Native). */
| 5845 | * @brief Builds the right script engine for a language tag (0=JS, 1=Lua, 2=Native). |
| 5846 | */ |
| 5847 | static std::unique_ptr<DataModel::IScriptEngine> makeScriptEngine(int language) |
| 5848 | { |
| 5849 | if (language == SerialStudio::Native) |
| 5850 | return std::make_unique<DataModel::CFrameParser>(); |
| 5851 | |
| 5852 | if (language == SerialStudio::Lua) |
| 5853 | return std::make_unique<DataModel::LuaScriptEngine>(); |
| 5854 | |
| 5855 | return std::make_unique<DataModel::JsScriptEngine>(); |
| 5856 | } |
| 5857 | |
| 5858 | /** |
| 5859 | * @brief Parses a delimiter field (frameStart / frameEnd) honoring the hexadecimalDelimiters flag. |
no outgoing calls
no test coverage detected