mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-08-28 04:46:30 -04:00
31 lines
783 B
Go
31 lines
783 B
Go
//go:build stxDockerfile || stxAll
|
|
|
|
package lexers
|
|
|
|
func init() {
|
|
syntaxMap["dockerfile"] = &lazySyntax{init: func() []byte {
|
|
return []byte(`filetype: dockerfile
|
|
rules:
|
|
- keyword: "(?i)^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|ARG|HEALTHCHECK|STOPSIGNAL|SHELL)[[:space:]]"
|
|
- statement: "(\\(|\\)|\\[|\\])"
|
|
- special: "&&"
|
|
- comment:
|
|
start: "#"
|
|
end: "$"
|
|
rules:
|
|
- todo: "(TODO|XXX|FIXME):?"
|
|
- constant.string:
|
|
start: "\""
|
|
end: "\""
|
|
skip: "\\\\."
|
|
rules:
|
|
- constant.specialChar: "\\\\."
|
|
- constant.string:
|
|
start: "'"
|
|
end: "'"
|
|
skip: "\\\\."
|
|
rules:
|
|
- constant.specialChar: "\\\\."`)
|
|
}}
|
|
}
|