From dfec4a48c7ac3ea4604b0a6d400109aa2004bad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Enge?= Date: Mon, 15 Jun 2015 00:04:05 +0200 Subject: [PATCH] Various cleanups added to asbjornenge/Docker.tmbundle (by the TM maintainer) and support for the LABEL instruction Docker-DCO-1.1-Signed-off-by: Asbjorn Enge (github: asbjornenge) --- .../Syntaxes/Dockerfile.tmLanguage | 78 +++++++++++++++---- 1 file changed, 64 insertions(+), 14 deletions(-) diff --git a/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage b/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage index c73ae21fa5..61e45ccbf6 100644 --- a/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage +++ b/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage @@ -1,54 +1,70 @@ - + - name - Dockerfile fileTypes Dockerfile + name + Dockerfile patterns - match - ^\s*(ONBUILD\s+)?(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|VOLUME|USER|LABEL|WORKDIR|COPY)\s captures - 0 + 1 name keyword.control.dockerfile - 1 + 2 name keyword.other.special-method.dockerfile + match + ^\s*(?:(ONBUILD)\s+)?(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|VOLUME|USER|WORKDIR|COPY|LABEL)\s - match - ^\s*(ONBUILD\s+)?(CMD|ENTRYPOINT)\s captures - 0 + 1 name keyword.operator.dockerfile - 1 + 2 name keyword.other.special-method.dockerfile + match + ^\s*(?:(ONBUILD)\s+)?(CMD|ENTRYPOINT)\s begin " + beginCaptures + + 1 + + name + punctuation.definition.string.begin.dockerfile + + end " + endCaptures + + 1 + + name + punctuation.definition.string.end.dockerfile + + name string.quoted.double.dockerfile patterns @@ -64,8 +80,24 @@ begin ' + beginCaptures + + 1 + + name + punctuation.definition.string.begin.dockerfile + + end ' + endCaptures + + 1 + + name + punctuation.definition.string.end.dockerfile + + name string.quoted.single.dockerfile patterns @@ -79,10 +111,28 @@ + captures + + 1 + + name + punctuation.whitespace.comment.leading.dockerfile + + 2 + + name + comment.line.number-sign.dockerfile + + 3 + + name + punctuation.definition.comment.dockerfile + + + comment + comment.line match - ^\s*#.*$ - name - comment.block.dockerfile + ^(\s*)((#).*$\n?) scopeName