MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / makeScriptEngine

Function makeScriptEngine

app/src/API/Handlers/ProjectHandler.cpp:5847–5856  ·  view source on GitHub ↗

* @brief Builds the right script engine for a language tag (0=JS, 1=Lua, 2=Native). */

Source from the content-addressed store, hash-verified

5845 * @brief Builds the right script engine for a language tag (0=JS, 1=Lua, 2=Native).
5846 */
5847static 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.

Callers 4

frameParserDryCompileMethod · 0.85
transformDryRunMethod · 0.85
applyTransformForDryRunFunction · 0.85
endToEndDryRunMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected