Skip to content

Commit

Permalink
enh: frontend to create IntegerConstant in case of boz
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranavchiku committed Jul 12, 2024
1 parent 5b06502 commit a71f0fa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lfortran/semantics/ast_common_visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -7628,8 +7628,9 @@ class CommonVisitor : public AST::BaseVisitor<Derived> {
}
std::string boz_str = s.substr(2, s.size() - 2);
int64_t boz_int = std::stoll(boz_str, nullptr, base);
tmp = ASR::make_IntegerBOZ_t(al, x.base.base.loc, boz_int,
boz_type, nullptr);
ASR::ttype_t* int_type = ASRUtils::TYPE(ASR::make_Integer_t(al, x.base.base.loc, compiler_options.po.default_integer_kind));
tmp = ASR::make_IntegerConstant_t(al, x.base.base.loc, boz_int,
int_type, boz_type);
}

void visit_Num(const AST::Num_t &x) {
Expand Down

0 comments on commit a71f0fa

Please sign in to comment.