]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/makefile.yaml
a729dee470bb4679af248cdf323c1387ecc72ccc
[micro.git] / runtime / syntax / makefile.yaml
1 filetype: makefile
2
3 detect: 
4     filename: "([Mm]akefile|\\.ma?k)$"
5     header: "^#!.*/(env +)?[bg]?make( |$)"
6
7 rules:
8     - preproc: "\\b(ifeq|ifdef|ifneq|ifndef|else|endif)\\b"
9     - preproc: "^(export|include|override)\\b"
10     - symbol.operator: "^[^:=   ]+:"
11     - symbol.operator: "[=,%]|\\+=|\\?=|:=|&&|\\|\\|"
12     - statement: "\\$\\((abspath|addprefix|addsuffix|and|basename|call|dir)[[:space:]]"
13     - statement: "\\$\\((error|eval|filter|filter-out|findstring|firstword)[[:space:]]"
14     - statement: "\\$\\((flavor|foreach|if|info|join|lastword|notdir|or)[[:space:]]"
15     - statement: "\\$\\((origin|patsubst|realpath|shell|sort|strip|suffix)[[:space:]]"
16     - statement: "\\$\\((value|warning|wildcard|word|wordlist|words)[[:space:]]"
17     - identifier: "^.+:"
18     - identifier: "[()$]"
19     - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
20     - identifier: "\\$+(\\{[^} ]+\\}|\\([^) ]+\\))"
21     - identifier: "\\$[@^<*?%|+]|\\$\\([@^<*?%+-][DF]\\)"
22     - identifier: "\\$\\$|\\\\.?"
23     - comment: "(^|[[:space:]])#([^{].*)?$"
24     - comment: "^       @#.*"