]> git.tdb.fi Git - libs/datafile.git/blob - source/token.h
ae4961947e6e3730359d5c8de4dbc761347469d5
[libs/datafile.git] / source / token.h
1 /* $Id$
2
3 This file is part of libmspdatafile
4 Copyright © 2006  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7 #ifndef MSP_DATAFILE_TOKEN_H_
8 #define MSP_DATAFILE_TOKEN_H_
9
10 namespace Msp {
11 namespace DataFile {
12
13 struct Token
14 {
15         enum Type
16         {
17                 INTEGER,
18                 FLOAT,
19                 STRING,
20                 IDENTIFIER,
21                 SPECIAL
22         };
23
24         Type type;
25         std::string str;
26
27         Token(): type(SPECIAL) { }
28         Token(Type t, const std::string &s): type(t), str(s) { }
29 };
30
31 } // namespace DataFile
32 } // namespace Msp
33
34 #endif