getTag function

String getTag(
  1. Declaration i
)

Implementation

String getTag(Declaration i) {
  if (i.metadata.isEmpty) return '';

  final annotation = i.metadata[0];
  if (annotation.name.toString() != 'pragma') return '';
  final val = annotation.arguments!.arguments[0] as SimpleStringLiteral;

  return val.value;
}