handle writer ast production