{"version":3,"file":"mode-gherkin-2493b8bb.js","sources":["../../node_modules/ace-builds/src-noconflict/mode-gherkin.js"],"sourcesContent":["ace.define(\"ace/mode/gherkin_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(require, exports, module){var oop = require(\"../lib/oop\");\nvar TextHighlightRules = require(\"./text_highlight_rules\").TextHighlightRules;\nvar stringEscape = \"\\\\\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\\\\\abfnrtv'\\\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})\";\nvar GherkinHighlightRules = function () {\n var languages = [{\n name: \"en\",\n labels: \"Feature|Background|Scenario(?: Outline)?|Examples\",\n keywords: \"Given|When|Then|And|But\"\n } \n ];\n var labels = languages.map(function (l) {\n return l.labels;\n }).join(\"|\");\n var keywords = languages.map(function (l) {\n return l.keywords;\n }).join(\"|\");\n this.$rules = {\n start: [{\n token: \"constant.numeric\",\n regex: \"(?:(?:[1-9]\\\\d*)|(?:0))\"\n }, {\n token: \"comment\",\n regex: \"#.*$\"\n }, {\n token: \"keyword\",\n regex: \"(?:\" + labels + \"):|(?:\" + keywords + \")\\\\b\"\n }, {\n token: \"keyword\",\n regex: \"\\\\*\"\n }, {\n token: \"string\",\n regex: '\"{3}',\n next: \"qqstring3\"\n }, {\n token: \"string\",\n regex: '\"',\n next: \"qqstring\"\n }, {\n token: \"text\",\n regex: \"^\\\\s*(?=@[\\\\w])\",\n next: [{\n token: \"text\",\n regex: \"\\\\s+\"\n }, {\n token: \"variable.parameter\",\n regex: \"@[\\\\w]+\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"start\"\n }]\n }, {\n token: \"comment\",\n regex: \"<[^>]+>\"\n }, {\n token: \"comment\",\n regex: \"\\\\|(?=.)\",\n next: \"table-item\"\n }, {\n token: \"comment\",\n regex: \"\\\\|$\",\n next: \"start\"\n }],\n \"qqstring3\": [{\n token: \"constant.language.escape\",\n regex: stringEscape\n }, {\n token: \"string\",\n regex: '\"{3}',\n next: \"start\"\n }, {\n defaultToken: \"string\"\n }],\n \"qqstring\": [{\n token: \"constant.language.escape\",\n regex: stringEscape\n }, {\n token: \"string\",\n regex: \"\\\\\\\\$\",\n next: \"qqstring\"\n }, {\n token: \"string\",\n regex: '\"|$',\n next: \"start\"\n }, {\n defaultToken: \"string\"\n }],\n \"table-item\": [{\n token: \"comment\",\n regex: /$/,\n next: \"start\"\n }, {\n token: \"comment\",\n regex: /\\|/\n }, {\n token: \"string\",\n regex: /\\\\./\n }, {\n defaultToken: \"string\"\n }]\n };\n this.normalizeRules();\n};\noop.inherits(GherkinHighlightRules, TextHighlightRules);\nexports.GherkinHighlightRules = GherkinHighlightRules;\n\n});\n\nace.define(\"ace/mode/gherkin\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/gherkin_highlight_rules\"], function(require, exports, module){var oop = require(\"../lib/oop\");\nvar TextMode = require(\"./text\").Mode;\nvar GherkinHighlightRules = require(\"./gherkin_highlight_rules\").GherkinHighlightRules;\nvar Mode = function () {\n this.HighlightRules = GherkinHighlightRules;\n this.$behaviour = this.$defaultBehaviour;\n};\noop.inherits(Mode, TextMode);\n(function () {\n this.lineCommentStart = \"#\";\n this.$id = \"ace/mode/gherkin\";\n this.getNextLineIndent = function (state, line, tab) {\n var indent = this.$getIndent(line);\n var space2 = \" \";\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n if (line.match(\"[ ]*\\\\|\")) {\n indent += \"| \";\n }\n if (tokens.length && tokens[tokens.length - 1].type == \"comment\") {\n return indent;\n }\n if (state == \"start\") {\n if (line.match(\"Scenario:|Feature:|Scenario Outline:|Background:\")) {\n indent += space2;\n }\n else if (line.match(\"(Given|Then).+(:)$|Examples:\")) {\n indent += space2;\n }\n else if (line.match(\"\\\\*.+\")) {\n indent += \"* \";\n }\n }\n return indent;\n };\n}).call(Mode.prototype);\nexports.Mode = Mode;\n\n}); (function() {\n ace.require([\"ace/mode/gherkin\"], function(m) {\n if (typeof module == \"object\" && typeof exports == \"object\" && module) {\n module.exports = m;\n }\n });\n })();\n "],"names":["require","exports","module","oop","TextHighlightRules","stringEscape","GherkinHighlightRules","languages","labels","l","keywords","TextMode","Mode","state","line","tab","indent","space2","tokenizedLine","tokens","m"],"mappings":"gaAAA,IAAI,OAAO,mCAAmC,CAAC,UAAU,UAAU,SAAS,cAAc,+BAA+B,EAAG,SAASA,EAASC,EAASC,EAAO,CAAC,IAAIC,EAAMH,EAAQ,YAAY,EACzLI,EAAqBJ,EAAQ,wBAAwB,EAAE,mBACvDK,EAAe,iFACfC,EAAwB,UAAY,CACpC,IAAIC,EAAY,CAAC,CACT,KAAM,KACN,OAAQ,oDACR,SAAU,yBACb,CACT,EACQC,EAASD,EAAU,IAAI,SAAUE,EAAG,CACpC,OAAOA,EAAE,MACjB,CAAK,EAAE,KAAK,GAAG,EACPC,EAAWH,EAAU,IAAI,SAAUE,EAAG,CACtC,OAAOA,EAAE,QACjB,CAAK,EAAE,KAAK,GAAG,EACX,KAAK,OAAS,CACV,MAAO,CAAC,CACA,MAAO,mBACP,MAAO,yBACvB,EAAe,CACC,MAAO,UACP,MAAO,MACvB,EAAe,CACC,MAAO,UACP,MAAO,MAAQD,EAAS,SAAWE,EAAW,MAC9D,EAAe,CACC,MAAO,UACP,MAAO,KACvB,EAAe,CACC,MAAO,SACP,MAAO,OACP,KAAM,WACtB,EAAe,CACC,MAAO,SACP,MAAO,IACP,KAAM,UACtB,EAAe,CACC,MAAO,OACP,MAAO,kBACP,KAAM,CAAC,CACC,MAAO,OACP,MAAO,MAC/B,EAAuB,CACC,MAAO,qBACP,MAAO,SAC/B,EAAuB,CACC,MAAO,QACP,MAAO,GACP,KAAM,OAC9B,CAAqB,CACrB,EAAe,CACC,MAAO,UACP,MAAO,SACvB,EAAe,CACC,MAAO,UACP,MAAO,WACP,KAAM,YACtB,EAAe,CACC,MAAO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