mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-08-29 21:36:27 -04:00
23 lines
594 B
Go
23 lines
594 B
Go
//go:build stxIni || stxAll
|
|
|
|
package syntax
|
|
|
|
func init() {
|
|
syntaxMap["ini"] = &lazySyntax{init: func() []byte {
|
|
return []byte(`filetype: ini
|
|
|
|
detect:
|
|
filename: "\\.(ini|desktop|lfl|override)$|(mimeapps\\.list|pinforc|setup\\.cfg)$|weechat/.+\\.conf$"
|
|
header: "^\\[[A-Za-z]+\\]$"
|
|
|
|
rules:
|
|
- constant.bool.true: "\\btrue\\b"
|
|
- constant.bool.false: "\\bfalse\\b"
|
|
- identifier: "^[[:space:]]*[^=]*="
|
|
- special: "^[[:space:]]*\\[.*\\]$"
|
|
- statement: "[=;]"
|
|
- comment: "(^|[[:space:]])#([^{].*)?$"
|
|
- constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"`)
|
|
}}
|
|
}
|