visitAnnotation method

  1. @override
void visitAnnotation(
  1. AnnotationAst astNode, [
  2. StringBuffer? _
])

Visits all annotation ASTs.

Implementation

@override
void visitAnnotation(AnnotationAst astNode, [_]) {
  if (astNode.name == i18nDescription ||
      astNode.name.startsWith(i18nDescriptionPrefix)) {
    CompileContext.current.reportAndRecover(BuildError.forSourceSpan(
      astNode.sourceSpan,
      "Internationalized messages can't be nested",
    ));
  }
}