From eacb4a7995e278976d1771cfec23d0e481b67e05 Mon Sep 17 00:00:00 2001 From: Jared Roesch Date: Thu, 10 Sep 2020 02:44:27 -0700 Subject: [PATCH] Fix again ... --- src/parser/parser.cc | 3 ++- src/parser/tokenizer.h | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser/parser.cc b/src/parser/parser.cc index d8eea8f4288ed..7277114c3cc39 100644 --- a/src/parser/parser.cc +++ b/src/parser/parser.cc @@ -1008,7 +1008,8 @@ class Parser { Consume(TokenType::kSemicolon); // Add the bindings to the local data structure. - bindings.push_back({var, val, span}); + std::tuple tuple(var, val, span); + bindings.push_back(tuple); scopes++; PushScope(); } else { diff --git a/src/parser/tokenizer.h b/src/parser/tokenizer.h index 4ce0510761e3d..20ad1734e5730 100644 --- a/src/parser/tokenizer.h +++ b/src/parser/tokenizer.h @@ -194,7 +194,8 @@ struct Tokenizer { auto suffix = number.substr(suffix_pos + 1, number.size() - suffix_pos); - int width; + int width = 32; + if (suffix.size()) { try { width = std::stoi(suffix); @@ -202,8 +203,6 @@ struct Tokenizer { this->diag_ctx.Emit(Diagnostic::Error(token->span) << "invalid numeric suffix `" << suffix << "`"); } - } else { - width = 32; } double value = stod(literal_text);