OSDN Git Service

composition の依存関係の循環のチェックを追加
[yamml/yamml-git.git] / src / ir2midi / command_insert.cpp
index 365aa1c..c77a7c4 100644 (file)
@@ -39,24 +39,13 @@ public:
     virtual void Process(const AST::Command& ast) override
     {
         ValidateArguments(ast);
-        GetCompiler()->CompileTrackBlock(boost::get<std::string>(ast.Arguments[0].Value));
+        GetCompiler()->CompileTrackBlock(boost::get<std::string>(ast.Arguments[0].Value), ast.Location);
     }
 
     void ValidateArguments(const AST::Command& ast)
     {
         ValidateArgCount(ast, 1);
         ValidateArgType(ast, 0, typeid(std::string));
-
-        auto name = boost::get<std::string>(ast.Arguments[0].Value);
-
-        if (!GetCompiler()->HasTrackBlock(name))
-        {
-            ThrowMessage(
-                Message::MessageID::NoSuchCompositionName,
-                ast.Location,
-                {name}
-            );
-        }
     }
 
 private: