+ /**
+ * Processes an annotation of form
+ * <pre>@Annotation "text"</pre>
+ * or
+ * <pre>@Annotation text</pre>
+ */
+ public static String processStringAnnotation(ErrorLog errorLog, DAnnotationAst annotation) {
+ if(annotation.parameters.length != 1)
+ errorLog.log(annotation.location, "Expected one string parameter for " + annotation.id.text);
+ String result = extractString(annotation.parameters[0]);
+ if(result == null)
+ errorLog.log(annotation.location, "Expected a string parameter for " + annotation.id.text);
+ return result;
+ }
+
+ public static void processTagAnnotation(ErrorLog errorLog, DAnnotationAst annotation) {
+ if(annotation.parameters.length != 0)
+ errorLog.log(annotation.location, "Expected no parameters for " + annotation.id.text);
+ }
+