Skip to content

Commit 8dda58a

Browse files
committed
Improve some javadoc
1 parent 5174180 commit 8dda58a

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

core/src/main/java/com/google/googlejavaformat/InputOutput.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected final void computeRanges(List<? extends Input.Tok> toks) {
8383
* Given an {@code InputOutput}, compute the map from tok indices to line ranges.
8484
*
8585
* @param put the {@code InputOutput}
86-
* @return the map from {@link com.google.googlejavaformat.java.JavaInput.Tok} indices to line
86+
* @return the map from {@code com.google.googlejavaformat.java.JavaInput.Tok} indices to line
8787
* ranges in this {@code put}
8888
*/
8989
public static Map<Integer, Range<Integer>> makeKToIJ(InputOutput put) {
@@ -114,11 +114,6 @@ public final Range<Integer> getRanges(int lineI) {
114114

115115
@Override
116116
public String toString() {
117-
return "InputOutput{"
118-
+ "lines="
119-
+ lines
120-
+ ", ranges="
121-
+ ranges
122-
+ '}';
117+
return "InputOutput{" + "lines=" + lines + ", ranges=" + ranges + '}';
123118
}
124119
}

core/src/main/java/com/google/googlejavaformat/java/Formatter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@
5959
* <p>This formatter uses the javac parser to generate an AST. Because the AST loses information
6060
* about the non-tokens in the input (including newlines, comments, etc.), and even some tokens
6161
* (e.g., optional commas or semicolons), this formatter lexes the input again and follows along in
62-
* the resulting list of tokens. Its lexer splits all multi-character operators (like ">>") into
63-
* multiple single-character operators. Each non-token is assigned to a token---non-tokens following
64-
* a token on the same line go with that token; those following go with the next token--- and there
65-
* is a final EOF token to hold final comments.
62+
* the resulting list of tokens. Its lexer splits all multi-character operators (like "&gt;&gt;")
63+
* into multiple single-character operators. Each non-token is assigned to a token---non-tokens
64+
* following a token on the same line go with that token; those following go with the next token---
65+
* and there is a final EOF token to hold final comments.
6666
*
6767
* <p>The formatter walks the AST to generate a Greg Nelson/Derek Oppen-style list of formatting
6868
* {@link Op}s [1--2] that then generates a structured {@link Doc}. Each AST node type has a visitor

0 commit comments

Comments
 (0)