From dc00986f29599a42fc13da17d954c8d14dec9422 Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Wed, 26 Jul 2017 14:20:09 +0700 Subject: [PATCH] Use godot style for property names --- godot.nimble | 2 +- godot/nim/godotmacros.nim | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/godot.nimble b/godot.nimble index 6b6f57b..712aadf 100644 --- a/godot.nimble +++ b/godot.nimble @@ -1,4 +1,4 @@ -version = "0.2.1" +version = "0.2.2" author = "Xored Software, Inc." description = "Godot Engine bindings" license = "MIT" diff --git a/godot/nim/godotmacros.nim b/godot/nim/godotmacros.nim index ee967d6..9ae1057 100644 --- a/godot/nim/godotmacros.nim +++ b/godot/nim/godotmacros.nim @@ -300,11 +300,11 @@ template registerGodotField(classNameLit, classNameIdent, propNameLit, cast[classNameIdent](nimPtr).propNameIdent = nimVal of ConversionResult.TypeError: let errStr = typeError(propTypeLit, $val, val.getType(), - classNameLit, propNameLit) + classNameLit, astToStr(propNameIdent)) printError(errStr) of ConversionResult.RangeError: let errStr = rangeError(propTypeLit, $val, - classNameLit, propNameLit) + classNameLit, astToStr(propNameIdent)) printError(errStr) proc getFuncIdent(obj: ptr GodotObject, methData: pointer, @@ -408,7 +408,7 @@ proc genType(obj: ObjectDecl): NimNode {.compileTime.} = let usageIdent = ident(usage) result.add(getAst( registerGodotField(classNameLit, classNameIdent, - newCStringLit($field.name.basename()), + newCStringLit(toGodotStyle($field.name.basename())), ident(field.name), newCStringLit($field.typ), field.typ, genSym(nskProc, "setFunc"), genSym(nskProc, "getFunc"),