diff --git a/pystencils/astnodes.py b/pystencils/astnodes.py index 2d3174a1a564bfd00633d36150d8119f7dacaec5..c0472f984c88fbb76eb86ea4fec8f6526e7079d4 100644 --- a/pystencils/astnodes.py +++ b/pystencils/astnodes.py @@ -1,3 +1,4 @@ +import uuid from typing import Any, List, Optional, Sequence, Set, Union import jinja2 @@ -700,3 +701,7 @@ class DestructuringBindingsForFieldClass(Node): def atoms(self, arg_type) -> Set[Any]: return self.body.atoms(arg_type) | {s for s in self.symbols_defined if isinstance(s, arg_type)} + + +def get_dummy_symbol(dtype='bool'): + return TypedSymbol('dummy%s' % uuid.uuid4().hex, create_type(dtype))