loom
1#include "DocumentOperationFactory.h"
2#include "fuze/FuzeDocumentOperation.h"
3#include "script/ScriptDocumentOperation.h"
4
5using namespace simodo;
6
7std::unique_ptr<lsp::DocumentOperation_interface> DocumentOperationFactory::create(lsp::DocumentContext & doc,
8const std::string & languageId)
9{
10doc.server().log().debug("DocumentOperationFactory::create called for '" + languageId + "'");
11
12if (languageId == "fuze")
13return std::make_unique<FuzeDocumentOperation>(doc, *this, languageId);
14
15return std::make_unique<ScriptDocumentOperation>(doc, *this, languageId);
16}