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