]> git.tdb.fi Git - libs/datafile.git/blob - source/token.h
050817b153fb010567e2732889895a91b4a06bde
[libs/datafile.git] / source / token.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_TOKEN_H_
7 #define MSP_PARSER_TOKEN_H_
8
9 namespace Msp {
10 namespace Parser {
11
12 struct Token
13 {
14         enum Type
15         {
16                 INTEGER,
17                 FLOAT,
18                 STRING,
19                 IDENTIFIER,
20                 SPECIAL
21         };
22
23         Type type;
24         std::string str;
25
26         Token(): type(SPECIAL) { }
27         Token(Type t, const std::string &s): type(t), str(s) { }
28 };
29
30 } // namespace Parser
31 } // namespace Msp
32
33 #endif