getTagArgs function

List<String> getTagArgs(
  1. Declaration i
)

Implementation

List<String> getTagArgs(Declaration i) {
  if (i.metadata.isEmpty) return [];

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

  return val.value.split(',');
}