| 150 | } |
| 151 | |
| 152 | Annotation * findAnnotation ( yyscan_t scanner, const string & name, const LineInfo & at ) { |
| 153 | auto ann = yyextra->g_Program->findAnnotation(name); |
| 154 | if ( ann.size()==1 ) { |
| 155 | return ann.back(); |
| 156 | } else if ( ann.size()==0 ) { |
| 157 | das_yyerror(scanner,"annotation " + name + " not found", at, CompilationError::lookup_annotation ); |
| 158 | return nullptr; |
| 159 | } else { |
| 160 | string candidates = yyextra->g_Program->describeCandidates(ann); |
| 161 | das_yyerror(scanner,"too many options for annotation " + name + "\n" + candidates, at, CompilationError::ambiguous_annotation ); |
| 162 | return nullptr; |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | void runFunctionAnnotations ( yyscan_t scanner, DasParserState * extra, Function * func, AnnotationList * annL, const LineInfo & at, bool genericMode ) { |
| 167 | if ( annL ) { |
no test coverage detected