[PHP] Escaped dollar signs in target string literals
This commit is contained in:
parent
a057ebbd2e
commit
5d3452e5be
|
@ -102,4 +102,12 @@ public class PHPTarget extends Target {
|
|||
protected void appendUnicodeEscapedCodePoint(int codePoint, StringBuilder sb) {
|
||||
UnicodeEscapes.appendPythonStyleEscapedCodePoint(codePoint, sb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTargetStringLiteralFromANTLRStringLiteral(CodeGenerator generator, String literal, boolean addQuotes) {
|
||||
String targetStringLiteral = super.getTargetStringLiteralFromANTLRStringLiteral(generator, literal, addQuotes);
|
||||
targetStringLiteral = targetStringLiteral.replace("$", "\\$");
|
||||
|
||||
return targetStringLiteral;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue