X-Git-Url: http://git.tdb.fi/?p=libs%2Fdatafile.git;a=blobdiff_plain;f=source%2Fstatement.h;h=9aad48d953226ba0ab1b3b209d88d10460d56f39;hp=f9287a51714f56e89719db5c2a3b6871f0889b81;hb=cd3de49e76305a50ae61696210ce10804a59cef1;hpb=5c98c1f499413c41fd46ddf71a46b481338d7d6b diff --git a/source/statement.h b/source/statement.h index f9287a5..9aad48d 100644 --- a/source/statement.h +++ b/source/statement.h @@ -7,6 +7,8 @@ namespace Msp { namespace DataFile { +struct Token; + class Statement { public: @@ -15,6 +17,7 @@ public: std::string keyword; Arguments args; bool valid; + bool control; std::string source; unsigned line; std::list sub; @@ -31,11 +34,35 @@ public: return *this; } + Statement &append_from_token(const Token &); + template Statement &operator,(const T &v) { return append(v); } }; +struct StatementKey +{ + std::string keyword; + std::string signature; + + StatementKey() { } + StatementKey(const std::string &k, const std::string &s): keyword(k), signature(s) { } + + bool operator<(const StatementKey &o) const + { return keyword arg_offsets; + + StatementInfo(); + StatementInfo(const std::string &, const std::string &); +}; + } // namespace DataFile } // namespace Msp