Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 830 | |
| 831 | // Format implements the NodeFormatter interface. |
| 832 | func (d *DDate) Format(ctx *FmtCtx) { |
| 833 | f := ctx.flags |
| 834 | bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings)) |
| 835 | if !bareStrings { |
| 836 | ctx.WriteByte('\'') |
| 837 | } |
| 838 | d.Date.Format(&ctx.Buffer) |
| 839 | if !bareStrings { |
| 840 | ctx.WriteByte('\'') |
| 841 | } |
| 842 | } |
| 843 | |
| 844 | // Size implements the Datum interface. |
| 845 | func (d *DDate) Size() uintptr { |