visitFieldTypeExpr method

  1. @override
Uint8List visitFieldTypeExpr(
  1. FieldTypeExpr expr
)
override

Implementation

@override
Uint8List visitFieldTypeExpr(FieldTypeExpr expr) {
  final bytesBuilder = BytesBuilder();
  final idBytes = _parseIdentifier(expr.id);
  bytesBuilder.add(idBytes);
  Uint8List typeBytes;
  if (expr.fieldType is FuncTypeExpr) {
    typeBytes = visitFunctionTypeExpr(expr.fieldType as FuncTypeExpr);
  } else {
    typeBytes = compileAST(expr.fieldType);
  }
  bytesBuilder.add(typeBytes);
  return bytesBuilder.toBytes();
}