]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/token.h
Add files
[libs/datafile.git] / source / token.h
diff --git a/source/token.h b/source/token.h
new file mode 100644 (file)
index 0000000..050817b
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+This file is part of libmspparser
+Copyright © 2006 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+#ifndef MSP_PARSER_TOKEN_H_
+#define MSP_PARSER_TOKEN_H_
+
+namespace Msp {
+namespace Parser {
+
+struct Token
+{
+       enum Type
+       {
+               INTEGER,
+               FLOAT,
+               STRING,
+               IDENTIFIER,
+               SPECIAL
+       };
+
+       Type type;
+       std::string str;
+
+       Token(): type(SPECIAL) { }
+       Token(Type t, const std::string &s): type(t), str(s) { }
+};
+
+} // namespace Parser
+} // namespace Msp
+
+#endif