Skip to content

Commit

Permalink
Fix again ...
Browse files Browse the repository at this point in the history
  • Loading branch information
jroesch committed Sep 14, 2020
1 parent 377e1f4 commit da61680
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/parser/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<relay::Var, relay::Expr, Span> tuple(var, val, span);
bindings.push_back(tuple);
scopes++;
PushScope();
} else {
Expand Down
5 changes: 2 additions & 3 deletions src/parser/tokenizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,15 @@ 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);
} catch (const std::invalid_argument& err) {
this->diag_ctx.Emit(Diagnostic::Error(token->span)
<< "invalid numeric suffix `" << suffix << "`");
}
} else {
width = 32;
}

double value = stod(literal_text);
Expand Down

0 comments on commit da61680

Please sign in to comment.