MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / findAnnotation

Function findAnnotation

src/parser/parser_impl.cpp:152–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 ) {

Callers 5

yyparseFunction · 0.85
yyparseFunction · 0.85
yyparseFunction · 0.85
findAnnotationMethod · 0.85
makeHandleTypeMethod · 0.85

Calls 3

das_yyerrorFunction · 0.70
findAnnotationMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected