]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/makefile.yaml
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / syntax / makefile.yaml
index a729dee470bb4679af248cdf323c1387ecc72ccc..7e90cdeb76aac90646299dbc6a0cb13f0d8673f6 100644 (file)
@@ -1,14 +1,14 @@
 filetype: makefile
 
-detect: 
+detect:
     filename: "([Mm]akefile|\\.ma?k)$"
     header: "^#!.*/(env +)?[bg]?make( |$)"
 
 rules:
-    - preproc: "\\b(ifeq|ifdef|ifneq|ifndef|else|endif)\\b"
-    - preproc: "^(export|include|override)\\b"
+    - preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>"
+    - statement: "^(export|include|override)\\>"
     - symbol.operator: "^[^:=  ]+:"
-    - symbol.operator: "[=,%]|\\+=|\\?=|:=|&&|\\|\\|"
+    - symbol.operator: "([=,%]|\\+=|\\?=|:=|&&|\\|\\|)"
     - statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
     - statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
     - statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
@@ -16,9 +16,23 @@ rules:
     - statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
     - identifier: "^.+:"
     - identifier: "[()$]"
-    - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
+    - constant.string:
+        start: "\""
+        end: "\""
+        skip: "\\\\."
+        rules:
+            - constant.specialChar: "\\\\."
+    - constant.string:
+        start: "'"
+        end: "'"
+        skip: "\\\\."
+        rules:
+            - constant.specialChar: "\\\\."
     - identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
     - identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)"
     - identifier: "\\$\\$|\\\\.?"
-    - comment: "(^|[[:space:]])#([^{].*)?$"
-    - comment: "^      @#.*"
+    - comment:
+        start: "#"
+        end: "$"
+        rules: []
+