diff options
Diffstat (limited to 'akonadish/syntaxtree.h')
-rw-r--r-- | akonadish/syntaxtree.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/akonadish/syntaxtree.h b/akonadish/syntaxtree.h index 77f52af..6fdf2b9 100644 --- a/akonadish/syntaxtree.h +++ b/akonadish/syntaxtree.h | |||
@@ -57,6 +57,7 @@ public: | |||
57 | 57 | ||
58 | static SyntaxTree *self(); | 58 | static SyntaxTree *self(); |
59 | 59 | ||
60 | int registerSyntax(std::function<Syntax::List()> f); | ||
60 | Syntax::List syntax() const; | 61 | Syntax::List syntax() const; |
61 | Command match(const QStringList &commands) const; | 62 | Command match(const QStringList &commands) const; |
62 | Syntax::List nearestSyntax(const QStringList &words, const QString &fragment) const; | 63 | Syntax::List nearestSyntax(const QStringList &words, const QString &fragment) const; |
@@ -73,3 +74,4 @@ private: | |||
73 | static SyntaxTree *s_module; | 74 | static SyntaxTree *s_module; |
74 | }; | 75 | }; |
75 | 76 | ||
77 | #define REGISTER_SYNTAX(name) static const int theTrickFor##name = SyntaxTree::self()->registerSyntax(&name::syntax); | ||