Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
finxxi committed Oct 9, 2024
1 parent 8c867d2 commit 7dd6f93
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/rewrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ impl<'a, 'tree> Rewrite for Interfaces<'a, 'tree> {
match_routing!(c, context, shape;
"scoped_type_identifier" => ScopedTypeIdentifier,
"type_identifier" => Value,
"generic_type" => GenericType,
)
})
.collect::<Vec<_>>()
Expand Down Expand Up @@ -684,6 +685,10 @@ impl<'a, 'tree> Rewrite for GenericType<'a, 'tree> {
result.push_str(name.v(source_code));
}

if let Some(s) = node.try_c_by_k("scoped_type_identifier") {
result.push_str(&rewrite::<ScopedTypeIdentifier>(&s, shape, context));
}

let arguments = node.c_by_k("type_arguments");
result.push_str(&rewrite::<TypeArguments>(&arguments, shape, context));
result
Expand Down
1 change: 1 addition & 0 deletions tests/prettier80/ClassInterface2.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public with sharing class Me implements Database.Batchable<SObject> {}
2 changes: 2 additions & 0 deletions tests/prettier80/ClassInterface2.p80
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
public with sharing class Me implements Database.Batchable<SObject> {
}

0 comments on commit 7dd6f93

Please sign in to comment.