Fixing concurrency problems

dev
Nick Dumas 2 years ago
parent 949b5c240e
commit 10076d69ea

@ -44,9 +44,11 @@ func lexIdent(l *Lexer) stateFn {
case isHeading(s):
l.emit(ItemIdent)
return lexHeading
}
}
return nil
panic("we shouldn't be here")
return nil // this shouldn't ever be reached
}
func lexHeading(l *Lexer) stateFn {
@ -78,7 +80,8 @@ func lexText(l *Lexer) stateFn {
r := l.next()
switch {
case r == EOF || r == '\n':
return l.errorf("wikilink terminated incorrectly")
l.emit(ItemText)
return nil
}
}
}

Loading…
Cancel
Save