]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/makefile.js
1 /*! `makefile` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Author: Ivan Sagalaev <maniac@softwaremaniacs.org>
8 Contributors: Joël Porquet <joel@porquet.org>
9 Website: https://www.gnu.org/software/make/manual/html_node/Introduction.html
10 Category: common, build-system
13 function makefile(hljs
) {
14 /* Variables: simple (eg $(var)) and special (eg $@) */
16 className: 'variable',
19 begin: '\\$\\(' + hljs
.UNDERSCORE_IDENT_RE
+ '\\)',
20 contains: [ hljs
.BACKSLASH_ESCAPE
]
22 { begin: /\$[@%<?\^\+\*]/ }
25 /* Quoted string with variables inside */
26 const QUOTE_STRING
= {
31 hljs
.BACKSLASH_ESCAPE
,
35 /* Function: $(func arg,...) */
37 className: 'variable',
38 begin: /\$\([\w-]+\s/,
41 'subst patsubst strip findstring filter filter-out sort '
42 + 'word wordlist firstword lastword dir notdir suffix basename '
43 + 'addsuffix addprefix join wildcard realpath abspath error warning '
44 + 'shell origin flavor foreach if or and call eval file value' },
47 QUOTE_STRING
// Added QUOTE_STRING as they can be a part of functions
50 /* Variable assignment */
51 const ASSIGNMENT
= { begin: '^' + hljs
.UNDERSCORE_IDENT_RE
+ '\\s*(?=[:+?]?=)' };
52 /* Meta targets (.PHONY) */
67 contains: [ VARIABLE
]
78 keyword: 'define endef undefine ifdef ifndef ifeq ifneq else endif '
79 + 'include -include sinclude override export unexport private vpath'
82 hljs
.HASH_COMMENT_MODE
,
97 export default hljsGrammar
;