-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Java: Added support for constants (#3507)
- Loading branch information
1 parent
05ee042
commit 342a003
Showing
6 changed files
with
69 additions
and
6 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,61 @@ | ||
public class Test { | ||
private static final String AAAA = "aaaaaa"; | ||
|
||
private String str = "1"; | ||
|
||
public static void main(String[] args) { | ||
str += AAAA + "AAAA"; | ||
} | ||
} | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "public"], | ||
["keyword", "class"], | ||
["class-name", ["Test"]], | ||
["punctuation", "{"], | ||
|
||
["keyword", "private"], | ||
["keyword", "static"], | ||
["keyword", "final"], | ||
["class-name", ["String"]], | ||
["constant", "AAAA"], | ||
["operator", "="], | ||
["string", "\"aaaaaa\""], | ||
["punctuation", ";"], | ||
|
||
["keyword", "private"], | ||
["class-name", ["String"]], | ||
" str ", | ||
["operator", "="], | ||
["string", "\"1\""], | ||
["punctuation", ";"], | ||
|
||
["keyword", "public"], | ||
["keyword", "static"], | ||
["keyword", "void"], | ||
["function", "main"], | ||
["punctuation", "("], | ||
["class-name", ["String"]], | ||
["punctuation", "["], | ||
["punctuation", "]"], | ||
" args", | ||
["punctuation", ")"], | ||
["punctuation", "{"], | ||
|
||
"\r\n str ", | ||
["operator", "+="], | ||
["constant", "AAAA"], | ||
["operator", "+"], | ||
["string", "\"AAAA\""], | ||
["punctuation", ";"], | ||
|
||
["punctuation", "}"], | ||
|
||
["punctuation", "}"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for all constants. |