1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-02-21 19:06:18 +02:00
Alec Thomas b30de35ff1 Use a callback to emit tokens.
This is a) faster and b) supports streaming output.
2017-06-07 19:47:59 +10:00

13 lines
204 B
Go

package formatters
import (
"io"
"github.com/alecthomas/chroma"
)
// Formatter returns a formatting function for tokens.
type Formatter interface {
Format(w io.Writer) (func(chroma.Token), error)
}