Skip to content

Commit

Permalink
Drop support for macros
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Feb 10, 2025
1 parent 110b9f7 commit 5b98486
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 24 deletions.
1 change: 0 additions & 1 deletion lib/src/front_end/ast_node_visitor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ final class AstNodeVisitor extends ThrowingAstVisitor<void> with PieceFactory {
node.interfaceKeyword,
node.finalKeyword,
node.sealedKeyword,
node.macroKeyword,
node.mixinKeyword,
node.classKeyword,
],
Expand Down
1 change: 0 additions & 1 deletion lib/src/short/source_visitor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,6 @@ final class SourceVisitor extends ThrowingAstVisitor {
modifier(node.finalKeyword);
modifier(node.sealedKeyword);
modifier(node.mixinKeyword);
modifier(node.macroKeyword);
token(node.classKeyword);
space();
token(node.name);
Expand Down
9 changes: 1 addition & 8 deletions test/short/whitespace/classes.unit
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,4 @@ base mixin class C11 = Object
abstract mixin class C12 = Object
with Mixin;
abstract base mixin class C13 = Object
with Mixin;
>>> macro class
macro class C1 {}
abstract macro class C6 {}
<<<
macro class C1 {}

abstract macro class C6 {}
with Mixin;
9 changes: 1 addition & 8 deletions test/tall/declaration/class.unit
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,4 @@ abstract base mixin class C13 {}
class SomeClass native "Zapp" {
}
<<<
class SomeClass native "Zapp" {}
>>> Macro class.
macro class C {}
abstract macro class D {}
<<<
macro class C {}

abstract macro class D {}
class SomeClass native "Zapp" {}
6 changes: 2 additions & 4 deletions test/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ Future<void> testBenchmarks({required bool useTallStyle}) async {
languageVersion: useTallStyle
? DartFormatter.latestLanguageVersion
: DartFormatter.latestShortStyleLanguageVersion,
pageWidth: benchmark.pageWidth,
experimentFlags: const ['macros']);
pageWidth: benchmark.pageWidth);

var actual = formatter.formatSource(SourceCode(benchmark.input));

Expand Down Expand Up @@ -131,8 +130,7 @@ void _testFile(TestFile testFile) {
var formatter = DartFormatter(
languageVersion: formatTest.languageVersion,
pageWidth: testFile.pageWidth,
indent: formatTest.leadingIndent,
experimentFlags: const ['macros']);
indent: formatTest.leadingIndent);

var actual = _validateFormat(
formatter,
Expand Down
3 changes: 1 addition & 2 deletions tool/update_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ Future<void> _updateTestFile(TestFile testFile) async {
var formatter = DartFormatter(
languageVersion: formatTest.languageVersion,
pageWidth: testFile.pageWidth,
indent: formatTest.leadingIndent,
experimentFlags: const ['macros']);
indent: formatTest.leadingIndent);

var actual = formatter.formatSource(formatTest.input);

Expand Down

0 comments on commit 5b98486

Please sign in to comment.