handle file declarations in treewalker