clang-format

pull/335/head
A. R. Shajii 2023-02-10 10:31:27 -05:00
parent c03d2e12cf
commit 47949ed17f
2 changed files with 6 additions and 3 deletions

View File

@ -269,7 +269,8 @@ void Cache::populatePythonModule() {
} else if (fna->args.size() == 1 + isMethod) {
ExprPtr po = N<IdExpr>(params[1].name);
if (fna->args[isMethod].type) {
po = N<CallExpr>(N<DotExpr>(fna->args[isMethod].type->clone(), "__from_py__"), po);
po = N<CallExpr>(N<DotExpr>(fna->args[isMethod].type->clone(), "__from_py__"),
po);
} else {
po = N<CallExpr>(N<IdExpr>("pyobj"), po);
}

View File

@ -9,10 +9,10 @@
#include <vector>
#include "codon/cir/cir.h"
#include "codon/cir/pyextension.h"
#include "codon/parser/ast.h"
#include "codon/parser/common.h"
#include "codon/parser/ctx.h"
#include "codon/cir/pyextension.h"
#define FILE_GENERATED "<generated>"
#define MODULE_MAIN "__main__"
@ -194,7 +194,9 @@ struct Cache : public std::enable_shared_from_this<Cache> {
std::string rootName = "";
bool isToplevel = false;
Function() : ast(nullptr), origAst(nullptr), type(nullptr), rootName(""), isToplevel(false) {}
Function()
: ast(nullptr), origAst(nullptr), type(nullptr), rootName(""),
isToplevel(false) {}
};
/// Function lookup table that maps a canonical function identifier to the
/// corresponding Function instance.