mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-09-06 00:47:15 -04:00
Rename "syntax" package to "lexers"
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
//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: "\\\\."`)
|
||||
}}
|
||||
}
|
||||
Reference in New Issue
Block a user