Commit e5700eb4 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Add `get_dummy_symbol`

parent faf330f8
import uuid
from typing import Any, List, Optional, Sequence, Set, Union from typing import Any, List, Optional, Sequence, Set, Union
import jinja2 import jinja2
...@@ -700,3 +701,7 @@ class DestructuringBindingsForFieldClass(Node): ...@@ -700,3 +701,7 @@ class DestructuringBindingsForFieldClass(Node):
def atoms(self, arg_type) -> Set[Any]: 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)} 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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment