Print godotapigen progress (closes #3)
This commit is contained in:
parent
7131cd0748
commit
0af5eb3b7f
1 changed files with 2 additions and 1 deletions
|
|
@ -780,6 +780,8 @@ proc genApi*(targetDir: string, apiJsonFile: string) =
|
||||||
isSingleton: obj["singleton"].bval
|
isSingleton: obj["singleton"].bval
|
||||||
)
|
)
|
||||||
for typ in types.values():
|
for typ in types.values():
|
||||||
|
let moduleName = typeNameToModuleName(typ.name)
|
||||||
|
echo "Generating ", moduleName, ".nim..."
|
||||||
let tree = newNode(nkStmtList)
|
let tree = newNode(nkStmtList)
|
||||||
let importStmt = newNode(nkImportStmt)
|
let importStmt = newNode(nkImportStmt)
|
||||||
importStmt.add(ident("godot"))
|
importStmt.add(ident("godot"))
|
||||||
|
|
@ -829,7 +831,6 @@ proc genApi*(targetDir: string, apiJsonFile: string) =
|
||||||
makeMethod(types, tree, methodBindRegsitry, typ, meth,
|
makeMethod(types, tree, methodBindRegsitry, typ, meth,
|
||||||
withImplementation = true)
|
withImplementation = true)
|
||||||
|
|
||||||
let moduleName = typeNameToModuleName(typ.name)
|
|
||||||
renderModule(tree, targetDir / moduleName & ".nim")
|
renderModule(tree, targetDir / moduleName & ".nim")
|
||||||
|
|
||||||
megaImport.add("import \"" & moduleName & "\"\n")
|
megaImport.add("import \"" & moduleName & "\"\n")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue