Source File
mysql.go
Belonging Package
github.com/alecthomas/chroma/v2/lexers
package lexersimport ()var (mysqlAnalyserNameBetweenBacktickRe = regexp.MustCompile("`[a-zA-Z_]\\w*`")mysqlAnalyserNameBetweenBracketRe = regexp.MustCompile(`\[[a-zA-Z_]\w*\]`))func init() { // nolint: gochecknoinitsGet("mysql").SetAnalyser(func( string) float32 {:= len(mysqlAnalyserNameBetweenBacktickRe.FindAllString(, -1)):= len(mysqlAnalyserNameBetweenBracketRe.FindAllString(, -1))var float32// Same logic as above in the TSQL analysis.:= +if >= 1 && >= (2*) {// Found at least twice as many `name` as [name].+= 0.5} else if > {+= 0.2} else if > 0 {+= 0.1}return})}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |