]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/graphql.js
1 /*! `graphql` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Author: John Foster (GH jf990), and others
9 Description: GraphQL is a query language for APIs
13 /** @type LanguageFn */
14 function graphql(hljs
) {
15 const regex
= hljs
.regex
;
16 const GQL_NAME
= /[_A-Za-z][_0-9A-Za-z]*/;
20 case_insensitive: true,
21 disableAutodetect: false,
45 hljs
.HASH_COMMENT_MODE
,
46 hljs
.QUOTE_STRING_MODE
,
55 begin: /[\!\(\)\:\=\[\]\{\|\}]{1}/,
72 begin: regex
.concat(GQL_NAME
, regex
.lookahead(/\s*:/)),
87 hljs
.registerLanguage('graphql', hljsGrammar
);