Add config for Dockerfile parser (#1288)

This commit is contained in:
Camden Cheek 2021-05-11 10:03:36 -06:00 committed by GitHub
parent 9e0f764b67
commit 40ffe75bd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 0 deletions

View file

@ -144,6 +144,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [css](https://github.com/tree-sitter/tree-sitter-css) (maintained by @TravonteD)
- [x] [dart](https://github.com/UserNobody14/tree-sitter-dart) (maintained by @Akin909)
- [x] [devicetree](https://github.com/joelspadin/tree-sitter-devicetree) (maintained by @jedrzejboczar)
- [x] [dockerfile](https://github.com/camdencheek/tree-sitter-dockerfile) (maintained by @camdencheek)
- [ ] [elm](https://github.com/elm-tooling/tree-sitter-elm)
- [x] [erlang](https://github.com/AbstractMachinesLab/tree-sitter-erlang) (maintained by @ostera)
- [x] [fennel](https://github.com/travonted/tree-sitter-fennel) (maintained by @TravonteD)

View file

@ -64,6 +64,15 @@ list.cpp = {
maintainers = {"@theHamsta"},
}
list.dockerfile = {
install_info = {
url = "https://github.com/camdencheek/tree-sitter-dockerfile",
branch = "main",
files = { "src/parser.c" },
},
maintainers = {"@camdencheek"},
}
list.rust = {
install_info = {
url = "https://github.com/tree-sitter/tree-sitter-rust",

View file

@ -0,0 +1,50 @@
[
"FROM"
"AS"
"RUN"
"CMD"
"LABEL"
"EXPOSE"
"ENV"
"ADD"
"COPY"
"ENTRYPOINT"
"VOLUME"
"USER"
"WORKDIR"
"ARG"
"ONBUILD"
"STOPSIGNAL"
"HEALTHCHECK"
"SHELL"
"MAINTAINER"
"CROSS_BUILD"
] @keyword
[
":"
"@"
] @operator
(comment) @comment
(image_spec
(image_tag
":" @punctuation.special)
(image_digest
"@" @punctuation.special))
(double_quoted_string) @string
(expansion
[
"$"
"{"
"}"
] @punctuation.special
)
((variable) @constant
(#match? @constant "^[A-Z][A-Z_0-9]*$"))

View file

@ -0,0 +1,3 @@
(comment) @comment
(shell_command) @bash