mirror of
https://github.com/alecthomas/chroma.git
synced 2025-11-23 22:24:39 +02:00
Add a bunch of automatically translated lexers.
This commit is contained in:
@@ -9,14 +9,14 @@ type coalescer struct {
|
||||
Lexer
|
||||
}
|
||||
|
||||
func (d *coalescer) Tokenise(text string, out func(Token)) error {
|
||||
func (d *coalescer) Tokenise(options *TokeniseOptions, text string, out func(Token)) error {
|
||||
var last *Token
|
||||
defer func() {
|
||||
if last != nil {
|
||||
out(*last)
|
||||
}
|
||||
}()
|
||||
return d.Lexer.Tokenise(text, func(token Token) {
|
||||
return d.Lexer.Tokenise(options, text, func(token Token) {
|
||||
if last == nil {
|
||||
last = &token
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user