var amod = mmodule2nmodule[mmod]
var module_decl = amod.n_moduledecl
if module_decl == null then continue
- var aas = module_decl.collect_annotations_by_name(name)
+ var aas = module_decl.get_annotations(name)
annotations.add_all aas
end
return annotations
var amod = mmodule2nmodule[mmodule]
var module_decl = amod.n_moduledecl
if module_decl != null then
- var annotations = module_decl.collect_annotations_by_name(name)
+ var annotations = module_decl.get_annotations(name)
if annotations.length == 1 then
return annotations.first
else if annotations.length > 1 then
end
redef class ANode
- # Return an array of tokens that match a given text
+ # Do a deep search and return an array of tokens that match a given text
fun collect_tokens_by_text(text: String): Array[Token]
do
var v = new CollectTokensByTextVisitor(text)
return v.result
end
- # Return an array of node that are annotated
+ # Do a deep search and return an array of node that are annotated
# The attached node can be retrieved by two invocation of parent
fun collect_annotations_by_name(name: String): Array[AAnnotation]
do
var auto_serializable_nclassdefs = new Array[AStdClassdef]
for nclassdef in nmodule.n_classdefs do
if nclassdef isa AStdClassdef and
- not nclassdef.collect_annotations_by_name("auto_serializable").is_empty then
+ not nclassdef.get_annotations("auto_serializable").is_empty then
auto_serializable_nclassdefs.add nclassdef
end
end