Add function parser
diff --git a/Function.h b/Function.h
new file mode 100644
index 0000000..cb3ba1c
--- /dev/null
+++ b/Function.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "Token.h"
+#include "AstNode.h"
+
+class Sentence {
+public:
+ Sentence() = default;
+ Sentence(QList<Token> pattern, QList<AstNode> result);
+
+ QList<Token> pattern() const;
+ QList<AstNode> result() const;
+
+ operator QString() const;
+
+protected:
+ QList<Token> _pattern;
+ QList<AstNode> _result;
+};
+
+class Function {
+public:
+ Function() = default;
+ explicit Function(QString name);
+ Function(QString name, QList<Sentence> sentences);
+
+ void addSentence(Sentence sentence);
+
+ QString name() const;
+ QList<Sentence> sentences() const;
+
+ operator QString() const;
+
+private:
+ QString _name;
+ QList<Sentence> _sentences;
+};