Add Impl postfix to procs duplicating methods
This commit is contained in:
parent
f5769045fc
commit
bc7d12d780
1 changed files with 9 additions and 2 deletions
|
|
@ -604,7 +604,8 @@ proc doGenerateMethod(tree: PNode, methodBindRegistry: var HashSet[string],
|
|||
proc generateMethod(tree: PNode, methodBindRegistry: var HashSet[string],
|
||||
name: PNode, godotMethodName: string,
|
||||
typ: GodotType, args: seq[MethodArg],
|
||||
returnType: string, isVirtual, isBase, withImplementation: bool) =
|
||||
returnType: string,
|
||||
isVirtual, isBase, withImplementation: bool) =
|
||||
doGenerateMethod(
|
||||
tree, methodBindRegistry, name, godotMethodName, typ,
|
||||
args, returnType, isVirtual, isBase, withImplementation)
|
||||
|
|
@ -666,8 +667,14 @@ proc makeMethod(types: Table[string, GodotType], tree: PNode,
|
|||
args.add(("variantArgs", "Variant", JsonNode(nil), true))
|
||||
|
||||
let godotName = methodObj["name"].str
|
||||
var nimName = toNimStyle(godotName)
|
||||
if not godotName.startsWith('_'):
|
||||
for meth in typ.jsonNode["methods"]:
|
||||
if meth["name"].str == '_' & godotName:
|
||||
nimName = nimName & "Impl"
|
||||
|
||||
generateMethod(tree, methodBindRegistry,
|
||||
ident(toNimStyle(godotName)), methodObj["name"].str,
|
||||
ident(nimName), methodObj["name"].str,
|
||||
typ, args,
|
||||
returnType, methodObj["is_virtual"].bval, isBase,
|
||||
withImplementation)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue