]> git.tdb.fi Git - libs/datafile.git/blob - source/statement.h
Type checking in value conversions
[libs/datafile.git] / source / statement.h
1 /*
2 This file is part of libmspparser
3 Copyright © 2006  Mikko Rasa, Mikkosoft Productions
4 Distributed under the LGPL
5 */
6 #ifndef MSP_PARSER_STATEMENT_H_
7 #define MSP_PARSER_STATEMENT_H_
8
9 #include <list>
10 #include <sstream>
11 #include <vector>
12 #include "value.h"
13
14 namespace Msp {
15 namespace Parser {
16
17 class Statement
18 {
19 public:
20         std::string keyword;
21         ValueArray  args;
22         bool        valid;
23         std::string source;
24         unsigned    line;
25         std::list<Statement> sub;
26
27         Statement(): valid(false), line(0) { }
28         std::string get_location() const
29         { std::ostringstream ss; ss<<source<<':'<<line; return ss.str(); }
30 };
31
32 } // namespace Parser
33 } // namespace Msp
34
35 #endif