mirror of https://github.com/exaloop/codon.git
clang-format
parent
a51a4eb0bd
commit
d238ee4656
|
@ -46,9 +46,8 @@ std::string StaticValue::toString() const {
|
|||
return "";
|
||||
if (!evaluated)
|
||||
return type == StaticValue::STRING ? "str" : "int";
|
||||
return type == StaticValue::STRING
|
||||
? "'" + escape(std::get<std::string>(value)) + "'"
|
||||
: std::to_string(std::get<int64_t>(value));
|
||||
return type == StaticValue::STRING ? "'" + escape(std::get<std::string>(value)) + "'"
|
||||
: std::to_string(std::get<int64_t>(value));
|
||||
}
|
||||
int64_t StaticValue::getInt() const {
|
||||
seqassert(type == StaticValue::INT, "not an int");
|
||||
|
|
|
@ -716,8 +716,8 @@ ExprPtr SimplifyVisitor::transformInt(const std::string &value,
|
|||
}
|
||||
/// Custom suffix sfx: use int.__suffix_sfx__(str) call.
|
||||
/// NOTE: you cannot neither use binary (0bXXX) format here.
|
||||
return transform(N<CallExpr>(N<DotExpr>("int", format("__suffix_{}__", suffix)),
|
||||
N<IntExpr>(val)));
|
||||
return transform(
|
||||
N<CallExpr>(N<DotExpr>("int", format("__suffix_{}__", suffix)), N<IntExpr>(val)));
|
||||
}
|
||||
|
||||
ExprPtr SimplifyVisitor::transformFloat(const std::string &value,
|
||||
|
|
Loading…
Reference in New Issue