Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def accept(self, node: Union[Statement, Expression]) -> Optional[T]:
with catch_errors(self.module_path, node.line):
if isinstance(node, Expression):
try:
res = node.accept(self)
#res = self.coerce(res, self.node_type(node), node.line)
# If we hit an error during compilation, we want to
# keep trying, so we can produce more error
# messages. Generate a temp of the right type to keep
# from causing more downstream trouble.
except UnsupportedException:
res = self.alloc_temp(self.node_type(node))
return res
else:
try:
node.accept(self)
except UnsupportedException:
def accept(self, node: Union[Statement, Expression]) -> Optional[T]:
with catch_errors(self.module_path, node.line):
if isinstance(node, Expression):
try:
res = node.accept(self)
#res = self.coerce(res, self.node_type(node), node.line)
# If we hit an error during compilation, we want to
# keep trying, so we can produce more error
# messages. Generate a temp of the right type to keep
# from causing more downstream trouble.
except UnsupportedException:
res = self.alloc_temp(self.node_type(node))
return res
else:
try:
node.accept(self)
except UnsupportedException:
def accept(self, node: Union[Statement, Expression]) -> Optional[T]:
with catch_errors(self.module_path, node.line):
if isinstance(node, Expression):
try:
res = node.accept(self)
#res = self.coerce(res, self.node_type(node), node.line)
# If we hit an error during compilation, we want to
# keep trying, so we can produce more error
# messages. Generate a temp of the right type to keep
# from causing more downstream trouble.
except UnsupportedException:
res = self.alloc_temp(self.node_type(node))
return res
else:
try:
node.accept(self)
except UnsupportedException: