- local binder = scope.current[id_name]
- if binder then bound_id[id] = binder
- else
- local occ = scope.current[id_name]free_id[id_name]
- if occ then table.insert (occ, id)
- else free_id[id_name] = { id } end
- end
+ -- ast which binds this id, might be nil:
+ local binder_ast = scope.current [id_name]
+ -- dict id_name => occurences, might be the list of unbound occurences:
+ local occur_dict = binder_ast and binders[binder_ast] or unbound
+ -- add an occurence of `id' in the occurences list:
+ local occurences = occur_dict [id_name]
+ if occurences then table.insert (occurences, id)
+ else occur_dict [id_name] = { id } end