Support initial batch of languages

This commit is contained in:
2025-06-14 13:35:39 -04:00
parent 34373e04d7
commit d68a3e73b3
47 changed files with 668 additions and 184 deletions
+43
View File
@@ -0,0 +1,43 @@
//go:build stxDockerfile || stxAll
package syntax
func init() {
syntaxMap["dockerfile"] = &lazySyntax{init: func() []byte {
return []byte(`filetype: dockerfile
detect:
filename: "(Dockerfile[^/]*$|\\.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: "\\\\."`)
}}
}