mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-08-28 04:46:30 -04:00
27 lines
583 B
Go
27 lines
583 B
Go
//go:build stxCaddyfile || stxAll
|
|
|
|
package syntax
|
|
|
|
func init() {
|
|
syntaxMap["caddyfile"] = &lazySyntax{init: func() []byte {
|
|
return []byte(`filetype: caddyfile
|
|
rules:
|
|
- identifier: "^\\s*\\S+(\\s|$)"
|
|
- type: "^([\\w.:/-]+,? ?)+[,{]$"
|
|
- constant.specialChar: "\\s{$"
|
|
- constant.specialChar: "^\\s*}$"
|
|
- constant.string:
|
|
start: "\""
|
|
end: "\""
|
|
skip: "\\\\."
|
|
rules:
|
|
- constant.specialChar: "\\\\."
|
|
|
|
- preproc: "\\{(\\w+|\\$\\w+|%\\w+%)\\}"
|
|
- comment:
|
|
start: "#"
|
|
end: "$"
|
|
rules: []`)
|
|
}}
|
|
}
|