Small cleaning.

This commit is contained in:
James Grogan 2022-12-04 18:13:32 +00:00
parent 70220fc6e9
commit d7fe11913f
26 changed files with 613 additions and 548 deletions

View file

@ -9,42 +9,42 @@
class TemplateFile
{
public:
TemplateFile(const Path& path);
TemplateFile(const Path& path);
std::vector<std::string> getProcessedContent() const;
std::vector<std::string> getProcessedContent() const;
std::string getName() const;
std::string getName() const;
void loadContent();
void loadContent();
void onTextBodyFinished(std::string working_string = {});
void onTextBodyFinished(std::string working_string = {});
void processLine(const std::string& line);
void processLine(const std::string& line);
void onFoundStatement(const std::string& statement_string);
void onFoundStatement(const std::string& statement_string);
void onFoundBlock(const std::vector<std::string> args);
void onFoundBlock(const std::vector<std::string> args);
void onFoundEndBlock(const std::vector<std::string> args);
void onFoundEndBlock(const std::vector<std::string> args);
void onFoundExtends(const std::vector<std::string> args);
void onFoundExtends(const std::vector<std::string> args);
void onFoundExpression(const std::string& expression_string);
void onFoundExpression(const std::string& expression_string);
void dumpContent();
void dumpContent();
TemplateNode* getContent() const
{
return mRootNode.get();
}
TemplateNode* getContent() const
{
return mRootNode.get();
}
private:
Path mPath;
unsigned mWorkingLine{ 0 };
std::string mParentName;
std::vector<std::string> mRawContent;
std::vector<std::string> mProcessedContent;
std::unique_ptr<TemplateNode> mRootNode;
TemplateNode* mWorkingNode{ nullptr };
std::unique_ptr<TemplateTextBody> mWorkingTextBody;
};
Path mPath;
unsigned mWorkingLine{ 0 };
std::string mParentName;
std::vector<std::string> mRawContent;
std::vector<std::string> mProcessedContent;
std::unique_ptr<TemplateNode> mRootNode;
TemplateNode* mWorkingNode{ nullptr };
std::unique_ptr<TemplateTextBody> mWorkingTextBody;
};