StrVal represents a constant string value.
| 456 | |
| 457 | // StrVal represents a constant string value. |
| 458 | type StrVal struct { |
| 459 | s string |
| 460 | |
| 461 | // scannedAsBytes is true iff the input syntax was using b'...' or |
| 462 | // x'....'. If false, the string is guaranteed to be a valid UTF-8 |
| 463 | // sequence. |
| 464 | scannedAsBytes bool |
| 465 | |
| 466 | // The following fields are used to avoid allocating Datums on type resolution. |
| 467 | resString DString |
| 468 | resBytes DBytes |
| 469 | } |
| 470 | |
| 471 | // NewStrVal constructs a StrVal instance. This is used during |
| 472 | // parsing when interpreting a token of type SCONST, i.e. *not* using |
nothing calls this directly
no outgoing calls
no test coverage detected