1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-13 17:29:29 +00:00

Make tests pass again.

This commit is contained in:
Chris Pressey 2018-03-29 16:50:07 +01:00
parent 8f1e35fb39
commit a759f4414b

View File

@ -314,8 +314,9 @@ class Analyzer(object):
for routine in program.routines:
context = self.analyze_routine(routine)
if context:
for encountered_goto in context.encountered_gotos():
fallthru_map.setdefault(encountered_goto.name, set()).add(routine.name)
encountered_gotos = list(context.encountered_gotos())
if len(encountered_gotos) == 1 and isinstance(encountered_gotos[0].type, RoutineType):
fallthru_map.setdefault(encountered_gotos[0].name, set()).add(routine.name)
program.fallthru_map = dict([(k, sorted(v)) for k, v in fallthru_map.iteritems()])
def analyze_routine(self, routine):