Commit 175ae7bf authored by Tom Niget's avatar Tom Niget

Add traceback info for visit_block

parent 5e09cc38
......@@ -2,6 +2,7 @@ import ast
from dataclasses import dataclass, field
from typing import Dict, Optional
from transpiler.utils import highlight
from transpiler.phases.typing.annotations import TypeAnnotationVisitor
from transpiler.phases.typing.scope import Scope, ScopeKind, VarDecl
from transpiler.phases.typing.types import BaseType, TypeVariable, TY_NONE, TypeType
......@@ -24,6 +25,9 @@ class ScoperVisitor(NodeVisitorSeq):
return res
def visit_block(self, block: list[ast.AST]):
if not block:
return
TB = f"running type analysis on block starting with {highlight(block[0])}"
from transpiler.phases.typing.block import ScoperBlockVisitor
self.fdecls = []
for b in block:
......
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