summaryrefslogtreecommitdiffstats
path: root/sinksh/syntaxtree.h
diff options
context:
space:
mode:
Diffstat (limited to 'sinksh/syntaxtree.h')
-rw-r--r--sinksh/syntaxtree.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sinksh/syntaxtree.h b/sinksh/syntaxtree.h
index 8fbbd01..ce28548 100644
--- a/sinksh/syntaxtree.h
+++ b/sinksh/syntaxtree.h
@@ -45,7 +45,16 @@ public:
45 QString keyword; 45 QString keyword;
46 QString help; 46 QString help;
47 Interactivity interactivity; 47 Interactivity interactivity;
48 std::function<bool(const QStringList &, State &)> lambda; 48
49 /**
50 * This function will be called to execute the command.
51 *
52 * @arguments: The command arguments
53 * @state: The state object
54 * @return: Return true for success and false for error. If the command is event driven, returning false will not start an event loop and abort immediately.
55 * If the command is not event driven, returning false will set the exit code to 1.
56 */
57 std::function<bool(const QStringList &arguments, State &state)> lambda;
49 std::function<QStringList(const QStringList &, const QString &, State &state)> completer; 58 std::function<QStringList(const QStringList &, const QString &, State &state)> completer;
50 59
51 QVector<Syntax> children; 60 QVector<Syntax> children;