site/node_modules/shiki/dist/langs/graphql.mjs

16 lines
19 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
import javascript from './javascript.mjs';
import typescript from './typescript.mjs';
import jsx from './jsx.mjs';
import tsx from './tsx.mjs';
const lang = Object.freeze({ "displayName": "GraphQL", "fileTypes": ["graphql", "graphqls", "gql", "graphcool"], "name": "graphql", "patterns": [{ "include": "#graphql" }], "repository": { "graphql": { "patterns": [{ "include": "#graphql-comment" }, { "include": "#graphql-description-docstring" }, { "include": "#graphql-description-singleline" }, { "include": "#graphql-fragment-definition" }, { "include": "#graphql-directive-definition" }, { "include": "#graphql-type-interface" }, { "include": "#graphql-enum" }, { "include": "#graphql-scalar" }, { "include": "#graphql-union" }, { "include": "#graphql-schema" }, { "include": "#graphql-operation-def" }, { "include": "#literal-quasi-embedded" }] }, "graphql-ampersand": { "captures": { "1": { "name": "keyword.operator.logical.graphql" } }, "match": "\\s*(&)" }, "graphql-arguments": { "begin": "\\s*(\\()", "beginCaptures": { "1": { "name": "meta.brace.round.directive.graphql" } }, "end": "\\s*(\\))", "endCaptures": { "1": { "name": "meta.brace.round.directive.graphql" } }, "name": "meta.arguments.graphql", "patterns": [{ "include": "#graphql-comment" }, { "include": "#graphql-description-docstring" }, { "include": "#graphql-description-singleline" }, { "begin": "\\s*([_A-Za-z][_0-9A-Za-z]*)(?:\\s*(:))", "beginCaptures": { "1": { "name": "variable.parameter.graphql" }, "2": { "name": "punctuation.colon.graphql" } }, "end": "(?=\\s*(?:(?:([_A-Za-z][_0-9A-Za-z]*)\\s*(:))|\\)))|\\s*(,)", "endCaptures": { "3": { "name": "punctuation.comma.graphql" } }, "patterns": [{ "include": "#graphql-comment" }, { "include": "#graphql-description-docstring" }, { "include": "#graphql-description-singleline" }, { "include": "#graphql-directive" }, { "include": "#graphql-value" }, { "include": "#graphql-skip-newlines" }] }, { "include": "#literal-quasi-embedded" }] }, "graphql-boolean-value": { "captures": { "1": { "name": "constant.language.boolean.graphql" } }, "match": "\\s*\\b(true|false)\\b" }, "graphql-colon": { "captures": { "1": { "name": "punctuation.colon.graphql" } }, "match": "\\s*(:)" }, "graphql-comma": { "captures": { "1": { "name": "punctuation.comma.graphql" } }, "match": "\\s*(,)" }, "graphql-comment": { "patterns": [{ "captures": { "1": { "name": "punctuation.whitespace.comment.leading.graphql" } }, "comment": "need to prefix comment space with a scope else Atom's reflow cmd doesn't work", "match": "(\\s*)(#).*", "name": "comment.line.graphql.js" }, { "begin": '(""")', "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.graphql" } }, "end": '(""")', "name": "comment.line.graphql.js" }, { "begin": '(")', "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.graphql" } }, "end": '(")', "name": "comment.line.graphql.js" }] }, "graphql-description-docstring": { "begin": '"""', "end": '"""', "name": "comment.block.graphql" }, "graphql-description-singleline": { "match": '#(?=([^"]*"[^"]*")*[^"]*$).*$', "name": "comment.line.number-sign.graphql" }, "graphql-directive": { "applyEndPatternLast": 1, "begin": "\\s*((@)\\s*([_A-Za-z][_0-9A-Za-z]*))", "beginCaptures": { "1": { "name": "entity.name.function.directive.graphql" } }, "end": "(?=.)", "patterns": [{ "include": "#graphql-comment" }, { "include": "#graphql-description-docstring" }, { "include": "#graphql-description-singleline" }, { "include": "#graphql-arguments" }, { "include": "#literal-quasi-embedded" }, { "include": "#graphql-skip-newlines" }] }, "graphql-directive-definition": { "applyEndPatternLast": 1, "begin": "\\s*(\\bdirective\\b)\\s*(@[_A-Za-z][_0-9A-Za-z]*)", "beginCaptures": { "1": { "name": "keyword.directive.graphql" }, "2": { "name": "entity.name.function.directive.graphql" }, "3": { "name": "keyword.on.graphql" }, "4": { "name": "support.type.graphql" } }, "end": "(?=.)", "patterns": [{ "include": "#graphql-variable-definitions" }, { "applyEndPatternLast": 1, "begin": "\\s*(\\bon\\b)\\s*([_A-Za-z]*)", "beginCaptures": { "1": { "name": "keyword.on.graphql" }, "2": { "name": "support.type.location.graphql" } }, "end": "(?=.)", "patterns": [{ "include": "#graphql-skip-newli
var graphql = [
...javascript,
...typescript,
...jsx,
...tsx,
lang
];
export { graphql as default };