Return all its annotations of a given name in the order of their declaration

Retun an empty array if no such an annotation.

Property definitions

nitc $ Prod :: get_annotations
	# Return all its annotations of a given name in the order of their declaration
	# Retun an empty array if no such an annotation.
	fun get_annotations(name: String): Array[AAnnotation]
	do
		var res = new Array[AAnnotation]
		var nas = n_annotations
		if nas != null then for na in nas.n_items do
			if na.name != name then continue
			res.add(na)
		end
		if self isa AClassdef then for na in n_propdefs do
			if na isa AAnnotPropdef then
				if na.name != name then continue
				res.add na
			end
		end

		return res
	end
src/parser/parser_nodes.nit:432,2--450,4