Skip to content
Snippets Groups Projects
Commit a558fe47 authored by Mick Jordan's avatar Mick Jordan
Browse files

workaround for a::"b"; "\n" may appear (quoted) in a name

parent ae832b1f
Branches
No related tags found
No related merge requests found
......@@ -275,7 +275,7 @@ public class RDeparse {
private final int cutoff;
private final boolean backtick;
private int opts;
private final int nlines;
@SuppressWarnings("unused") private final int nlines;
private int inCurly = 0;
private int inList = 0;
......@@ -322,7 +322,6 @@ public class RDeparse {
}
private DeparseVisitor append(String str) {
assert !str.contains("\n");
sb.append(str);
return this;
}
......@@ -549,7 +548,12 @@ public class RDeparse {
} else if (args.length == 1) {
append(args[0]).append(symbol).append("NULL");
} else {
append(args[0]).append(symbol).append(args[1]);
// FIXME use call syntax until parser fixed to accept literals
if (args[1] instanceof RSyntaxConstant) {
append('`').append(symbol).append('`').append('(').append(args[0]).append(", ").append(args[1]).append(')');
} else {
append(args[0]).append(symbol).append(args[1]);
}
}
return null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment