@@ -24,6 +24,7 @@ public final class StringValue extends ASTNodeAccessImpl implements Expression {
2424 Arrays .asList ("N" , "U" , "E" , "R" , "B" , "RB" , "_utf8" , "Q" );
2525 private String value = "" ;
2626 private String prefix = null ;
27+ private String quoteStr = "'" ;
2728
2829 public StringValue () {
2930 // empty constructor
@@ -35,6 +36,11 @@ public StringValue(String escapedValue) {
3536 && escapedValue .endsWith ("'" )) {
3637 value = escapedValue .substring (1 , escapedValue .length () - 1 );
3738 return ;
39+ } else if (escapedValue .length () >= 4 && escapedValue .startsWith ("$$" )
40+ && escapedValue .endsWith ("$$" )) {
41+ value = escapedValue .substring (2 , escapedValue .length () - 2 );
42+ quoteStr = "$$" ;
43+ return ;
3844 }
3945
4046 if (escapedValue .length () > 2 ) {
@@ -68,6 +74,15 @@ public void setPrefix(String prefix) {
6874 this .prefix = prefix ;
6975 }
7076
77+ public String getQuoteStr () {
78+ return quoteStr ;
79+ }
80+
81+ public StringValue setQuoteStr (String quoteStr ) {
82+ this .quoteStr = quoteStr ;
83+ return this ;
84+ }
85+
7186 public String getNotExcapedValue () {
7287 StringBuilder buffer = new StringBuilder (value );
7388 int index = 0 ;
@@ -87,7 +102,7 @@ public <T, S> T accept(ExpressionVisitor<T> expressionVisitor, S context) {
87102
88103 @ Override
89104 public String toString () {
90- return (prefix != null ? prefix : "" ) + "'" + value + "'" ;
105+ return (prefix != null ? prefix : "" ) + quoteStr + value + quoteStr ;
91106 }
92107
93108 public StringValue withPrefix (String prefix ) {
0 commit comments