Skip to content

Commit

Permalink
Be agnostic order of 'requires' and 'transitive'
Browse files Browse the repository at this point in the history
modifiers on requires directives.

See #75

MOE_MIGRATED_REVID=166152386
  • Loading branch information
cushon committed Aug 23, 2017
1 parent c31bb19 commit f74657c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2403,13 +2403,16 @@ public Void visitProvides(ProvidesTree node, Void unused) {
public Void visitRequires(RequiresTree node, Void unused) {
token("requires");
builder.space();
if (builder.peekToken().equals(Optional.of("static"))) {
token("static");
builder.space();
}
if (builder.peekToken().equals(Optional.of("transitive"))) {
token("transitive");
builder.space();
while (true) {
if (builder.peekToken().equals(Optional.of("static"))) {
token("static");
builder.space();
} else if (builder.peekToken().equals(Optional.of("transitive"))) {
token("transitive");
builder.space();
} else {
break;
}
}
scan(node.getModuleName(), null);
token(";");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@Deprecated
module moduletags {
requires transitive static moduleA;

exports testpkgmdltags;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@Deprecated
module moduletags {
requires transitive static moduleA;

exports testpkgmdltags;
}

0 comments on commit f74657c

Please sign in to comment.