Skip to content

Commit eacb4a7

Browse files
committed
Fix again ...
1 parent d47ae36 commit eacb4a7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/parser/parser.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,8 @@ class Parser {
10081008
Consume(TokenType::kSemicolon);
10091009

10101010
// Add the bindings to the local data structure.
1011-
bindings.push_back({var, val, span});
1011+
std::tuple<relay::Var, relay::Expr, Span> tuple(var, val, span);
1012+
bindings.push_back(tuple);
10121013
scopes++;
10131014
PushScope();
10141015
} else {

src/parser/tokenizer.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,15 @@ struct Tokenizer {
194194

195195
auto suffix = number.substr(suffix_pos + 1, number.size() - suffix_pos);
196196

197-
int width;
197+
int width = 32;
198+
198199
if (suffix.size()) {
199200
try {
200201
width = std::stoi(suffix);
201202
} catch (const std::invalid_argument& err) {
202203
this->diag_ctx.Emit(Diagnostic::Error(token->span)
203204
<< "invalid numeric suffix `" << suffix << "`");
204205
}
205-
} else {
206-
width = 32;
207206
}
208207

209208
double value = stod(literal_text);

0 commit comments

Comments
 (0)