summaryrefslogtreecommitdiff
path: root/tools/minicargo/toml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/minicargo/toml.cpp')
-rw-r--r--tools/minicargo/toml.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/minicargo/toml.cpp b/tools/minicargo/toml.cpp
index 2b95a5c9..a33114c6 100644
--- a/tools/minicargo/toml.cpp
+++ b/tools/minicargo/toml.cpp
@@ -30,6 +30,22 @@ struct Token
::std::string m_data;
int64_t m_intval = 0;
+ Token(Type ty):
+ m_type(ty)
+ {
+ }
+ Token(Type ty, ::std::string s):
+ m_type(ty),
+ m_data(s)
+ {
+ }
+ Token(Type ty, int64_t i):
+ m_type(ty),
+ m_intval(i)
+ {
+ }
+
+
static Token lex_from(::std::ifstream& is);
static Token lex_from_inner(::std::ifstream& is);
@@ -387,7 +403,7 @@ Token Token::lex_from_inner(::std::ifstream& is)
c = is.get();
}
is.putback(c);
- return Token { Type::Integer, "", val };
+ return Token { Type::Integer, val };
}
else
{