diff options
author | Aaron Seigo <aseigo@kde.org> | 2015-12-28 20:19:42 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2015-12-28 20:19:42 +0100 |
commit | 949609b3f19b8a8823a7c62f23617eef05b796dd (patch) | |
tree | 33b5b481af626407699aa9487fd6dc8b212867b1 | |
parent | 4b9675e797c87ea363aa313854b72b5754122b79 (diff) | |
download | sink-949609b3f19b8a8823a7c62f23617eef05b796dd.tar.gz sink-949609b3f19b8a8823a7c62f23617eef05b796dd.zip |
allow access to the state member
-rw-r--r-- | akonadish/syntaxtree.cpp | 5 | ||||
-rw-r--r-- | akonadish/syntaxtree.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/akonadish/syntaxtree.cpp b/akonadish/syntaxtree.cpp index 495ad22..4860582 100644 --- a/akonadish/syntaxtree.cpp +++ b/akonadish/syntaxtree.cpp | |||
@@ -168,6 +168,11 @@ Syntax::List SyntaxTree::nearestSyntax(const QStringList &words, const QString & | |||
168 | return matches; | 168 | return matches; |
169 | } | 169 | } |
170 | 170 | ||
171 | State &SyntaxTree::state() | ||
172 | { | ||
173 | return m_state; | ||
174 | } | ||
175 | |||
171 | QStringList SyntaxTree::tokenize(const QString &text) | 176 | QStringList SyntaxTree::tokenize(const QString &text) |
172 | { | 177 | { |
173 | //TODO: properly tokenize (e.g. "foo bar" should not become ['"foo', 'bar"']a | 178 | //TODO: properly tokenize (e.g. "foo bar" should not become ['"foo', 'bar"']a |
diff --git a/akonadish/syntaxtree.h b/akonadish/syntaxtree.h index 884a10d..ee06d28 100644 --- a/akonadish/syntaxtree.h +++ b/akonadish/syntaxtree.h | |||
@@ -63,7 +63,7 @@ public: | |||
63 | Syntax::List syntax() const; | 63 | Syntax::List syntax() const; |
64 | Command match(const QStringList &commands) const; | 64 | Command match(const QStringList &commands) const; |
65 | Syntax::List nearestSyntax(const QStringList &words, const QString &fragment) const; | 65 | Syntax::List nearestSyntax(const QStringList &words, const QString &fragment) const; |
66 | 66 | State &state(); | |
67 | bool run(const QStringList &commands); | 67 | bool run(const QStringList &commands); |
68 | 68 | ||
69 | static QStringList tokenize(const QString &text); | 69 | static QStringList tokenize(const QString &text); |