diff --git a/src/ZoneCodeGeneratorLib/Domain/Information/StructureInformation.h b/src/ZoneCodeGeneratorLib/Domain/Information/StructureInformation.h index 5761e3d2..9ede86df 100644 --- a/src/ZoneCodeGeneratorLib/Domain/Information/StructureInformation.h +++ b/src/ZoneCodeGeneratorLib/Domain/Information/StructureInformation.h @@ -35,5 +35,4 @@ public: std::unique_ptr m_post_load_action; const FastFileBlock* m_block; - std::vector m_name_chain; }; diff --git a/src/ZoneCodeGeneratorLib/Parsing/Commands/Impl/CommandsParser.cpp b/src/ZoneCodeGeneratorLib/Parsing/Commands/Impl/CommandsParser.cpp index 617d2ca6..303e1d9e 100644 --- a/src/ZoneCodeGeneratorLib/Parsing/Commands/Impl/CommandsParser.cpp +++ b/src/ZoneCodeGeneratorLib/Parsing/Commands/Impl/CommandsParser.cpp @@ -11,7 +11,6 @@ #include "Parsing/Commands/Sequence/SequenceCondition.h" #include "Parsing/Commands/Sequence/SequenceCount.h" #include "Parsing/Commands/Sequence/SequenceGame.h" -#include "Parsing/Commands/Sequence/SequenceName.h" #include "Parsing/Commands/Sequence/SequenceReorder.h" #include "Parsing/Commands/Sequence/SequenceReusable.h" #include "Parsing/Commands/Sequence/SequenceScriptString.h" @@ -39,7 +38,6 @@ const std::vector& CommandsParser::GetTestsForState new SequenceCondition(), new SequenceCount(), new SequenceGame(), - new SequenceName(), new SequenceReorder(), new SequenceReusable(), new SequenceScriptString(), diff --git a/src/ZoneCodeGeneratorLib/Parsing/Commands/Sequence/SequenceName.cpp b/src/ZoneCodeGeneratorLib/Parsing/Commands/Sequence/SequenceName.cpp deleted file mode 100644 index f364cd57..00000000 --- a/src/ZoneCodeGeneratorLib/Parsing/Commands/Sequence/SequenceName.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "SequenceName.h" - -#include "Parsing/Commands/Matcher/CommandsCommonMatchers.h" -#include "Parsing/Commands/Matcher/CommandsMatcherFactory.h" - -namespace -{ - static constexpr auto CAPTURE_TYPE = 1; -} - -SequenceName::SequenceName() -{ - const CommandsMatcherFactory create(this); - - AddLabeledMatchers(CommandsCommonMatchers::Typename(this), CommandsCommonMatchers::LABEL_TYPENAME); - AddMatchers({ - create.Keyword("set"), - create.Keyword("name"), - create.Label(CommandsCommonMatchers::LABEL_TYPENAME).Capture(CAPTURE_TYPE), - create.Char(';'), - }); -} - -void SequenceName::ProcessMatch(CommandsParserState* state, SequenceResult& result) const -{ - const auto& typeNameToken = result.NextCapture(CAPTURE_TYPE); - - StructureInformation* type; - std::vector members; - if (!state->GetTypenameAndMembersFromTypename(typeNameToken.TypeNameValue(), type, members)) - throw ParsingException(typeNameToken.GetPos(), "Unknown type"); - - if (members.empty()) - throw ParsingException(typeNameToken.GetPos(), "Need to specify a member when trying to set to a structure name."); - - type->m_name_chain = std::move(members); -} diff --git a/src/ZoneCodeGeneratorLib/Parsing/Commands/Sequence/SequenceName.h b/src/ZoneCodeGeneratorLib/Parsing/Commands/Sequence/SequenceName.h deleted file mode 100644 index d9b86d53..00000000 --- a/src/ZoneCodeGeneratorLib/Parsing/Commands/Sequence/SequenceName.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once - -#include "Parsing/Commands/Impl/CommandsParser.h" - -class SequenceName final : public CommandsParser::sequence_t -{ -public: - SequenceName(); - -protected: - void ProcessMatch(CommandsParserState* state, SequenceResult& result) const override; -};