Appends the StarlarkValue.str representation of a value to the printer's buffer. Unlike repr(x), it does not quote strings at top level, though strings and other values appearing as elements of other structures are quoted as if by repr. Implementations of StarlarkValue ma
(Object o, StarlarkSemantics semantics)
| 131 | * <p>Implementations of StarlarkValue may define their own behavior of {@code str}. |
| 132 | */ |
| 133 | public Printer str(Object o, StarlarkSemantics semantics) { |
| 134 | if (o instanceof String) { |
| 135 | return this.append((String) o); |
| 136 | |
| 137 | } else if (o instanceof StarlarkValue) { |
| 138 | ((StarlarkValue) o).str(this, semantics); |
| 139 | return this; |
| 140 | |
| 141 | } else { |
| 142 | return this.repr(o); |
| 143 | } |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Appends the {@code StarlarkValue.repr} (quoted) representation of a value to the printer's |
no test coverage detected