Use type.keyword instead of keyword

Some syntax files used keyword from an old version when they should have
been using type.keyword.

Fixes #811
This commit is contained in:
Zachary Yedidia
2017-09-13 18:00:47 -04:00
parent 612658d9c4
commit 33cb39d318
5 changed files with 18 additions and 17 deletions

View File

@@ -5,7 +5,7 @@ detect:
rules:
## Keywords
- keyword: "(?i)^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|ARG|HEALTHCHECK|STOPSIGNAL|SHELL)[[:space:]]"
- type.keyword: "(?i)^(FROM|MAINTAINER|RUN|CMD|LABEL|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|ARG|HEALTHCHECK|STOPSIGNAL|SHELL)[[:space:]]"
## Brackets & parenthesis
- statement: "(\\(|\\)|\\[|\\])"

View File

@@ -12,17 +12,18 @@ rules:
end: "$"
rules: []
# File changes
- keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
- keyword: "#[[:space:]]deleted:"
- keyword: "#[[:space:]]modified:"
- keyword: "#[[:space:]]new file:"
- keyword: "#[[:space:]]renamed:"
- type.keyword: "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
- type.keyword: "#[[:space:]]deleted:"
- type.keyword: "#[[:space:]]modified:"
- type.keyword: "#[[:space:]]new file:"
- type.keyword: "#[[:space:]]renamed:"
# Untracked filenames
- error: "^# [^/?*:;{}\\\\]+\\.[^/?*:;{}\\\\]+$"
- keyword: "^#[[:space:]]Changes.*[:]"
- keyword: "^#[[:space:]]Your branch and '[^']+"
- keyword: "^#[[:space:]]Your branch and '"
- keyword: "^#[[:space:]]On branch [^ ]+"
- keyword: "^#[[:space:]]On branch"
- type.keyword: "^#[[:space:]]Changes.*[:]"
- type.keyword: "^#[[:space:]]Your branch and '[^']+"
- type.keyword: "^#[[:space:]]Your branch and '"
- type.keyword: "^#[[:space:]]On branch [^ ]+"
- type.keyword: "^#[[:space:]]On branch"
# Recolor hash symbols
- special: "#"

View File

@@ -5,7 +5,7 @@ detect:
rules:
- constant: "\\<(true|false)\\>"
- keyword: "^[[:space:]]*[^=]*="
- type.keyword: "^[[:space:]]*[^=]*="
- constant: "^[[:space:]]*\\[.*\\]$"
- constant: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
- comment:

View File

@@ -9,7 +9,7 @@ rules:
- identifier: "[a-zA-Z][_a-zA-Z0-9]*[[:space:]]*"
- statement: "\\b(assembly|break|continue|do|for|function|if|else|new|return|returns|while)\\b"
- special: "\\b(\\.send|throw)\\b" # make sure they are very visible
- keyword: "\\b(anonymous|constant|indexed|payable|public|private|external|internal)\\b"
- type.keyword: "\\b(anonymous|constant|indexed|payable|public|private|external|internal)\\b"
- constant: "\\b(block(\\.(blockhash|coinbase|difficulty|gaslimit|number|timestamp))?|msg(\\.(data|gas|sender|value))?|now|tx(\\.(gasprice|origin))?)\\b"
- constant: "\\b(keccak256|sha3|sha256|ripemd160|ecrecover|addmod|mulmod|this|super|selfdestruct|\\.balance)\\b"
- constant: "\\b(true|false)\\b"