visitTypeVariantNode method

  1. @override
Future<Element> visitTypeVariantNode(
  1. TypeVariantNode node
)
override

Implementation

@override
Future<Element> visitTypeVariantNode(TypeVariantNode node) async {
  final typeVariantElement = TypeVariantElement(name: node.name.lexeme);

  for (final parameter in node.parameters) {
    final parameterElement = await parameter.accept(this) as ParameterElement;
    parameterElement.enclosingElement = typeVariantElement;
    typeVariantElement.parameters.add(parameterElement);
  }

  return typeVariantElement;
}