Changeset View
Changeset View
Standalone View
Standalone View
src/backends/lua/luaexpression.h
Show All 24 Lines | |||||
25 | 25 | | |||
26 | struct lua_State; | 26 | struct lua_State; | ||
27 | 27 | | |||
28 | class LuaExpression : public Cantor::Expression | 28 | class LuaExpression : public Cantor::Expression | ||
29 | { | 29 | { | ||
30 | Q_OBJECT | 30 | Q_OBJECT | ||
31 | 31 | | |||
32 | public: | 32 | public: | ||
33 | LuaExpression( Cantor::Session* session, lua_State* L); | 33 | LuaExpression( Cantor::Session* session); | ||
34 | ~LuaExpression(); | 34 | ~LuaExpression(); | ||
35 | 35 | | |||
36 | void evaluate(); | 36 | void evaluate(); | ||
37 | void interrupt(); | 37 | void interrupt(); | ||
38 | void parseOutput(QString& output); | ||||
38 | 39 | | |||
39 | private: | | |||
40 | // evaluates an expression, executing it on the Lua state and building an adequate response | | |||
41 | void execute(QString& ret, Cantor::Expression::Status& status); | | |||
42 | | ||||
43 | lua_State* m_L; | | |||
44 | }; | 40 | }; | ||
45 | 41 | | |||
46 | #endif /* _LUAEXPRESSION_H */ | 42 | #endif /* _LUAEXPRESSION_H */ |