You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nodes of type TypeDecl created by _Atomic() don't seem to have a correct coord attribute:
file atomic.c:
typedef _Atomic(char) atomic_char;
from pycparser import parse_file
from pycparser.c_ast import NodeVisitor
class TypedefVisitor(NodeVisitor):
def visit_TypeDecl(self, node):
print(node.coord) # prints None
print(node.type.coord) # prints the correct location
ast = parse_file('atomic.c')
TypedefVisitor().visit(ast)
I don't know if this behavior is correct, but it seems inconsistent to me. It's a bit annoying since I use it to filter out ast nodes from included files when generating wrapper code.
The text was updated successfully, but these errors were encountered:
Nodes of type TypeDecl created by _Atomic() don't seem to have a correct coord attribute:
file atomic.c:
I don't know if this behavior is correct, but it seems inconsistent to me. It's a bit annoying since I use it to filter out ast nodes from included files when generating wrapper code.
The text was updated successfully, but these errors were encountered: