Fix gdobj to properly handle var block

This commit is contained in:
Ruslan Mustakov 2018-08-14 17:59:24 +07:00
commit fd5f77e7c2
2 changed files with 6 additions and 2 deletions

View file

@ -1,4 +1,4 @@
version = "0.7.14" version = "0.7.15"
author = "Xored Software, Inc." author = "Xored Software, Inc."
description = "Godot Engine bindings" description = "Godot Engine bindings"
license = "MIT" license = "MIT"

View file

@ -172,7 +172,11 @@ proc parseMethod(meth: NimNode): MethodDecl =
proc parseVarSection(decl: NimNode): seq[VarDecl] = proc parseVarSection(decl: NimNode): seq[VarDecl] =
assert(decl.kind == nnkVarSection) assert(decl.kind == nnkVarSection)
result = identDefsToVarDecls(decl[0]) for i in 0..<decl.len:
if i == 0:
result = identDefsToVarDecls(decl[i])
else:
result.add(identDefsToVarDecls(decl[i]))
proc parseType(definition, callSite: NimNode): ObjectDecl = proc parseType(definition, callSite: NimNode): ObjectDecl =
let body = callSite[^1] let body = callSite[^1]