blob: 5cfce9f3b7439c6dd32fc7f51c2caa136e7134ae [file] [log] [blame]
// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
import 'package:_fe_analyzer_shared/src/macros/api.dart';
import 'macro_dependency.dart';
macro
class MethodMacro implements ClassDeclarationsMacro {
const MethodMacro();
@override
FutureOr<void> buildDeclarationsForClass(ClassDeclaration clazz,
ClassMemberDeclarationBuilder builder) async {
builder.declareInClass(new DeclarationCode.fromString(generateBody()));
}
}