summaryrefslogtreecommitdiff
path: root/pycparser/c_ast.py
diff options
context:
space:
mode:
Diffstat (limited to 'pycparser/c_ast.py')
-rw-r--r--pycparser/c_ast.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/pycparser/c_ast.py b/pycparser/c_ast.py
index 0ce8fef..192c106 100644
--- a/pycparser/c_ast.py
+++ b/pycparser/c_ast.py
@@ -863,6 +863,27 @@ class Return(Node):
attr_names = ()
+class StaticAssert(Node):
+ __slots__ = ('cond', 'message', 'coord', '__weakref__')
+ def __init__(self, cond, message, coord=None):
+ self.cond = cond
+ self.message = message
+ self.coord = coord
+
+ def children(self):
+ nodelist = []
+ if self.cond is not None: nodelist.append(("cond", self.cond))
+ if self.message is not None: nodelist.append(("message", self.message))
+ return tuple(nodelist)
+
+ def __iter__(self):
+ if self.cond is not None:
+ yield self.cond
+ if self.message is not None:
+ yield self.message
+
+ attr_names = ()
+
class Struct(Node):
__slots__ = ('name', 'decls', 'coord', '__weakref__')
def __init__(self, name, decls, coord=None):