-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=261976141
- Loading branch information
Showing
2 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
`Tree#toString` shouldn't be used for Trees deriving from the code being | ||
compiled, as it discards whitespace and comments. | ||
|
||
* If this code is within an Error Prone check, using | ||
`VisitorState#getSourceForNode` will give you the original source text. Note | ||
that for synthetic trees (e.g.: implicit constructors), that source may be | ||
`null`. | ||
|
||
* Prefer `Elements#getConstantExpression` to `TreeMaker.Literal` for escaping | ||
constants in generated code. |