ast: use cls instead of Mapper