mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-24 09:47:19 +09:00
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:
@@ -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: "(\\(|\\)|\\[|\\])"
|
||||
|
||||
@@ -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: "#"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ detect:
|
||||
|
||||
rules:
|
||||
- constant: "\\<(true|false)\\>"
|
||||
- keyword: "^[[:space:]]*[^=]*="
|
||||
- type.keyword: "^[[:space:]]*[^=]*="
|
||||
- constant: "^[[:space:]]*\\[.*\\]$"
|
||||
- constant: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
|
||||
- comment:
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user