Enable allTypes() for type specifiers

This commit is contained in:
Bartłomiej Pluta
2019-07-10 11:34:25 +02:00
parent f6d1f91708
commit 746c1bc568

View File

@@ -77,6 +77,9 @@ def argumentsNodeToMethodSignature(node):
def multipleTypeMatcher(typeNode):
subSignature = []
if len(typeNode.type.children) == 0:
return allTypes()
for child in typeNode.type.children:
m = typeMatcher(child)
subSignature.append(m)
@@ -99,6 +102,9 @@ def typeMatcher(typeNode):
def listSpecifier(specifier):
subSignature = []
if len(specifier.children) == 0:
subSignature.append(allTypes())
for child in specifier.children:
subSignature.append(typeMatcher(child))
@@ -108,6 +114,12 @@ def mapSpecifier(keySpecifier, valueSpecifier):
keySubSignature = []
valueSubSignature = []
if len(keySpecifier.children) == 0:
keySubSignature.append(allTypes())
if len(valueSpecifier.children) == 0:
valueSubSignature.append(allTypes())
for child in keySpecifier.children:
keySubSignature.append(typeMatcher(child))