I need to find the function argument has a return type or not using Pycparser.How will I do that?

134 Views Asked by At

My code is:-

class FuncDefVisitor(c_ast.NodeVisitor):

    def visit_FuncDef(self, node):
    
    node.body.show()

    node.decl.type.args.show()

    print('%s at %s' % (node.decl.name, node.decl.coord))

I am unable to understand how to find if the function argument has a return type and if it has a return type I have to generate an error message . How can I do it using the PYCPARSER??

0

There are 0 best solutions below