Skip to content

Commit

Permalink
Improve some javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
cushon committed May 25, 2018
1 parent 5174180 commit 8dda58a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected final void computeRanges(List<? extends Input.Tok> toks) {
* Given an {@code InputOutput}, compute the map from tok indices to line ranges.
*
* @param put the {@code InputOutput}
* @return the map from {@link com.google.googlejavaformat.java.JavaInput.Tok} indices to line
* @return the map from {@code com.google.googlejavaformat.java.JavaInput.Tok} indices to line
* ranges in this {@code put}
*/
public static Map<Integer, Range<Integer>> makeKToIJ(InputOutput put) {
Expand Down Expand Up @@ -114,11 +114,6 @@ public final Range<Integer> getRanges(int lineI) {

@Override
public String toString() {
return "InputOutput{"
+ "lines="
+ lines
+ ", ranges="
+ ranges
+ '}';
return "InputOutput{" + "lines=" + lines + ", ranges=" + ranges + '}';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@
* <p>This formatter uses the javac parser to generate an AST. Because the AST loses information
* about the non-tokens in the input (including newlines, comments, etc.), and even some tokens
* (e.g., optional commas or semicolons), this formatter lexes the input again and follows along in
* the resulting list of tokens. Its lexer splits all multi-character operators (like ">>") into
* multiple single-character operators. Each non-token is assigned to a token---non-tokens following
* a token on the same line go with that token; those following go with the next token--- and there
* is a final EOF token to hold final comments.
* the resulting list of tokens. Its lexer splits all multi-character operators (like "&gt;&gt;")
* into multiple single-character operators. Each non-token is assigned to a token---non-tokens
* following a token on the same line go with that token; those following go with the next token---
* and there is a final EOF token to hold final comments.
*
* <p>The formatter walks the AST to generate a Greg Nelson/Derek Oppen-style list of formatting
* {@link Op}s [1--2] that then generates a structured {@link Doc}. Each AST node type has a visitor
Expand Down

0 comments on commit 8dda58a

Please sign in to comment.