aboutsummaryrefslogtreecommitdiff
path: root/src/delombok/lombok
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2013-10-27 22:32:44 +0100
committerReinier Zwitserloot <reinier@zwitserloot.com>2013-10-27 22:32:44 +0100
commit5cdb0757d39d100c76bbca63734fb83b4cb13753 (patch)
tree0262ce9f265201d27e6d1a110964fafca1c5b9bd /src/delombok/lombok
parent601cd66babeaec0963b8cadf2190fd48708d0d33 (diff)
downloadlombok-5cdb0757d39d100c76bbca63734fb83b4cb13753.tar.gz
lombok-5cdb0757d39d100c76bbca63734fb83b4cb13753.tar.bz2
lombok-5cdb0757d39d100c76bbca63734fb83b4cb13753.zip
[issue 598] JDK8 update broke assignment-with-operator in delombok.
Diffstat (limited to 'src/delombok/lombok')
-rw-r--r--src/delombok/lombok/delombok/PrettyCommentsPrinter.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
index 67c313ab..f9152e68 100644
--- a/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
+++ b/src/delombok/lombok/delombok/PrettyCommentsPrinter.java
@@ -158,6 +158,18 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
map.put(treeTag("DIV"), "/");
map.put(treeTag("MOD"), "%");
+ map.put(treeTag("BITOR_ASG"), "|=");
+ map.put(treeTag("BITXOR_ASG"), "^=");
+ map.put(treeTag("BITAND_ASG"), "&=");
+ map.put(treeTag("SL_ASG"), "<<=");
+ map.put(treeTag("SR_ASG"), ">>=");
+ map.put(treeTag("USR_ASG"), ">>>=");
+ map.put(treeTag("PLUS_ASG"), "+=");
+ map.put(treeTag("MINUS_ASG"), "-=");
+ map.put(treeTag("MUL_ASG"), "*=");
+ map.put(treeTag("DIV_ASG"), "/=");
+ map.put(treeTag("MOD_ASG"), "%=");
+
OPERATORS = map;
}
@@ -1234,8 +1246,8 @@ public class PrettyCommentsPrinter extends JCTree.Visitor {
try {
open(prec, TreeInfo.assignopPrec);
printExpr(tree.lhs, TreeInfo.assignopPrec + 1);
-// print(" " + operatorName(getTag(tree) - JCTree.ASGOffset) + "= ");
- print(" = ");
+ String opname = operatorName(treeTag(tree));
+ print(" " + opname + " ");
printExpr(tree.rhs, TreeInfo.assignopPrec);
close(prec, TreeInfo.assignopPrec);
} catch (IOException e) {