Transpiled ES5 code to ES6/ES7

This commit is contained in:
Liyas Thomas
2020-06-11 19:55:40 +05:30
parent 9bc0ae975a
commit 0644a8c9fb
16 changed files with 108 additions and 123 deletions

View File

@@ -9,16 +9,16 @@ export function defineGQLLanguageMode(ace) {
const TextHighlightRules = aceRequire("ace/mode/text_highlight_rules").TextHighlightRules
const GQLQueryTextHighlightRules = function () {
var keywords =
const keywords =
"type|interface|union|enum|schema|input|implements|extends|scalar|fragment|query|mutation|subscription"
var dataTypes = "Int|Float|String|ID|Boolean"
const dataTypes = "Int|Float|String|ID|Boolean"
var literalValues = "true|false|null"
const literalValues = "true|false|null"
var escapeRe = /\\(?:u[\da-fA-f]{4}|.)/
const escapeRe = /\\(?:u[\da-fA-f]{4}|.)/
var keywordMapper = this.createKeywordMapper(
const keywordMapper = this.createKeywordMapper(
{
keyword: keywords,
"storage.type": dataTypes,
@@ -48,7 +48,7 @@ export function defineGQLLanguageMode(ace) {
},
{
token: "string", // character
regex: "'(?:" + escapeRe + "|.)?'",
regex: `'(?:${escapeRe}|.)?'`,
},
{
token: "string.start",