grammars/source.data-weave.json in github-linguist-7.11.1 vs grammars/source.data-weave.json in github-linguist-7.12.0

- old
+ new

@@ -1,1580 +2 @@ -{ - "name": "DataWeave", - "scopeName": "source.data-weave", - "patterns": [ - { - "include": "#comments" - }, - { - "include": "#directives" - }, - { - "name": "keyword.operator.body-marker.dw", - "match": "(---)" - }, - { - "include": "#expressions" - }, - { - "name": "invalid", - "match": "([^\\s]+)" - } - ], - "repository": { - "array-literal": { - "name": "meta.array.literal.dw", - "begin": "(?\u003c!\\w|}|])(\\[)", - "end": "\\]", - "patterns": [ - { - "include": "#expressions" - }, - { - "include": "#punctuation-comma" - } - ], - "beginCaptures": { - "0": { - "name": "meta.brace.square.dw" - } - }, - "endCaptures": { - "0": { - "name": "meta.brace.square.dw" - } - } - }, - "attr-literal": { - "name": "meta.attributes.dw", - "begin": "\\@\\(", - "end": "\\)", - "patterns": [ - { - "include": "#object-member" - } - ], - "beginCaptures": { - "0": { - "name": "keyword.operator.attributes.dw" - } - }, - "endCaptures": { - "0": { - "name": "keyword.operator.attributes.dw" - } - } - }, - "case-clause": { - "name": "case-clause.expr.dw", - "begin": "(?\u003c!\\.|\\$)\\b(case|else(?=\\s*-\u003e))\\b(?!\\$|\\.)", - "end": "\\-\\\u003e", - "patterns": [ - { - "begin": "(?\u003c!\\.|\\$)\\b(is)\\s+", - "end": "(?=\\-\\\u003e)", - "patterns": [ - { - "include": "#types" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.control.is.dw" - } - } - }, - { - "begin": "(?\u003c!\\.|\\$)\\b(matches)\\b", - "end": "(?=\\-\\\u003e)", - "patterns": [ - { - "include": "#expressions" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.control.matches.dw" - } - } - }, - { - "begin": "(?\u003c!\\.|\\$)\\b([A-Za-z][a-zA-Z0-9_]*)\\s*:\\s+", - "end": "(?=\\-\\\u003e)", - "patterns": [ - { - "include": "#expressions" - } - ], - "beginCaptures": { - "1": { - "name": "entity.name.variable.dw" - } - } - }, - { - "begin": "(?\u003c!\\.|\\$)\\b([A-Za-z][a-zA-Z0-9_]*)\\s*(if|matches)\\s+", - "end": "(?=\\-\\\u003e)", - "patterns": [ - { - "include": "#expressions" - } - ], - "beginCaptures": { - "1": { - "name": "entity.name.variable.dw" - }, - "2": { - "name": "keyword.control.if.dw" - } - } - }, - { - "include": "#expressions" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.control.switch.dw" - } - }, - "endCaptures": { - "0": { - "name": "keyword.control.switch.dw" - } - } - }, - "cast": { - "begin": "(?\u003c!\\.|\\$)\\b(as|is)\\s+", - "end": "(?=$|^|[;,:})\\]\\s])", - "patterns": [ - { - "include": "#types" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.control.as.dw" - } - } - }, - "comments": { - "patterns": [ - { - "name": "comment.block.dw", - "begin": "/\\*", - "end": "\\*/", - "captures": { - "0": { - "name": "punctuation.definition.comment.dw" - } - } - }, - { - "match": "\\s*((//).*$\\n?)", - "captures": { - "1": { - "name": "comment.line.double-slash.dw" - }, - "2": { - "name": "punctuation.definition.comment.dw" - } - } - } - ] - }, - "constants": { - "patterns": [ - { - "name": "constant.language.dw", - "match": "\\b(true|false|null)\\b" - }, - { - "name": "constant.numeric.dw", - "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b" - }, - { - "begin": "\\|", - "end": "\\|", - "patterns": [ - { - "name": "constant.numeric.dw", - "match": "([0-9]+)" - }, - { - "name": "constant.character.escape.dw", - "match": "([+:\\-WYMDTHSPZ\\.])" - }, - { - "name": "invalid", - "match": "([^\\|])" - } - ], - "beginCaptures": { - "0": { - "name": "constant.numeric.dw" - } - }, - "endCaptures": { - "0": { - "name": "constant.numeric.dw" - } - } - } - ] - }, - "directives": { - "patterns": [ - { - "include": "#dw-directive" - }, - { - "include": "#import-directive" - }, - { - "include": "#type-directive" - }, - { - "include": "#fun-directive" - }, - { - "include": "#var-directive" - }, - { - "include": "#ns-directive" - }, - { - "include": "#input-directive" - }, - { - "include": "#output-directive" - } - ] - }, - "do-statement": { - "name": "do-statement.expr.dw", - "begin": "(?\u003c!\\.|\\$)\\b(do)\\s*(\\{)", - "end": "(\\})", - "patterns": [ - { - "include": "#comments" - }, - { - "include": "#directives" - }, - { - "name": "keyword.operator.body-marker.dw", - "match": "(---)" - }, - { - "include": "#expressions" - }, - { - "name": "invalid", - "match": "([^\\s]+)" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.control.do.dw" - }, - "2": { - "name": "punctuation.definitions.begin.dw" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.definitions.end.dw" - } - } - }, - "dw-directive": { - "name": "meta.directive.version.dw", - "begin": "(?\u003c!\\.|\\$)(%dw)\\s+([0-9]\\.[0-9])(?!\\$|\\.)", - "end": "(?=\\n)", - "beginCaptures": { - "1": { - "name": "comment.dw" - }, - "2": { - "name": "comment.dw" - } - } - }, - "expressions": { - "name": "expression", - "patterns": [ - { - "name": "keyword.other.dw", - "match": "\\b(not)\\s+" - }, - { - "include": "#paren-expression" - }, - { - "include": "#strings" - }, - { - "include": "#constants" - }, - { - "include": "#comments" - }, - { - "include": "#match-statement" - }, - { - "include": "#using-statement" - }, - { - "include": "#do-statement" - }, - { - "include": "#if-statement" - }, - { - "include": "#regex" - }, - { - "include": "#keywords" - }, - { - "include": "#object-literal" - }, - { - "include": "#array-literal" - }, - { - "include": "#cast" - }, - { - "include": "#object-member" - }, - { - "include": "#variable-reference" - }, - { - "include": "#selectors" - }, - { - "include": "#directives" - }, - { - "include": "#infix" - } - ] - }, - "fun-directive": { - "name": "meta.directive.fun.dw", - "begin": "(\\s*(fun)\\s+([a-zA-Z][a-zA-Z0-9]*))", - "end": "(=)", - "patterns": [ - { - "begin": "\u003c", - "end": "\u003e", - "patterns": [ - { - "include": "#generics" - } - ] - }, - { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#parameters" - } - ] - }, - { - "begin": "(:)", - "end": "(?==)", - "patterns": [ - { - "include": "#types" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.operator.declaration.dw" - } - } - } - ], - "beginCaptures": { - "2": { - "name": "storage.type.dw" - }, - "3": { - "name": "entity.name.function.dw" - } - }, - "endCaptures": { - "0": { - "name": "keyword.operator.assignment.dw" - } - } - }, - "function_call": { - "name": "function_call", - "begin": "\\s*\\(", - "end": "\\s*\\)", - "patterns": [ - { - "include": "#punctuation-comma" - }, - { - "include": "#expressions" - } - ] - }, - "generics": { - "patterns": [ - { - "begin": "(:)", - "end": "(?=,|\u003e)", - "patterns": [ - { - "include": "#types" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.operator.declaration.dw" - } - } - }, - { - "name": "keyword.operator.extends.dw", - "match": "\u003c:" - }, - { - "include": "#keywords" - }, - { - "name": "entity.name.type.parameter.dw", - "match": "\\w+" - } - ] - }, - "if-statement": { - "name": "meta.if.dw", - "begin": "(?\u003c!\\.|\\$)\\b(if\\s*)\\(", - "end": "\\)", - "patterns": [ - { - "include": "#expressions" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.control.if.dw" - } - } - }, - "import-directive": { - "name": "meta.directive.import.dw", - "begin": "(\\s*(import)\\s+)", - "end": "(?=(fun|input|output|type|var|ns|import|%dw|private|---)\\s|$)", - "patterns": [ - { - "include": "#comments" - }, - { - "match": "(,)" - }, - { - "match": "(\\*)" - }, - { - "match": "\\b(from)\\s+", - "captures": { - "1": { - "name": "storage.type.dw" - } - } - }, - { - "name": "entity.name.other.dw", - "match": "(?:[a-zA-Z][a-zA-Z0-9]*(?:::[a-zA-Z][a-zA-Z0-9]*)*)\n" - }, - { - "match": "\\s+(as)\\s+([a-zA-Z][a-zA-Z0-9]*)", - "captures": { - "1": { - "name": "keyword.other.dw" - }, - "2": { - "name": "entity.name.other.dw" - } - } - } - ], - "beginCaptures": { - "2": { - "name": "storage.type.dw" - } - } - }, - "infix": { - "name": "support.function.dw", - "match": "(?\u003c!^|,|\\[|\\(|=|\\+|\u003e|\u003c|\\-|\\*|:|\\{|case|is|else|not|as|and|or)(?\u003c=[a-zA-Z0-9_$\\}\\])\"'`|/])\\s*(?!(var|match|case|else|fun|input|output|is|as|default|ns|import|null|false|true|using|do|not|and|or)\\s)(\\+\\+|\\-\\-|[a-zA-Z][a-zA-Z_0-9]*)(\\s+|\\s*(?=[\"'/|{]))" - }, - "input-directive": { - "name": "meta.directive.ns.dw", - "begin": "(?\u003c!\\.|\\$)\\b(input)\\s+([[:alpha:]][[:alnum:]]*)\\s*", - "end": "(?=\\n)", - "patterns": [ - { - "begin": "(\\:\\s*)", - "end": "(\\s|\\n)", - "patterns": [ - { - "include": "#types" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.other.dw" - } - } - }, - { - "name": "string.mime.dw", - "match": "([^{\\n\\s])" - } - ], - "beginCaptures": { - "1": { - "name": "storage.type.dw" - }, - "2": { - "name": "entity.name.variable.dw" - } - } - }, - "keywords": { - "patterns": [ - { - "name": "keyword.reserved.dw", - "match": "\\b(throw|for|yield|enum|private|async)\\b" - }, - { - "name": "invalid", - "match": "\\b(not)\\b" - }, - { - "name": "keyword.control.dw", - "match": "\\b(if|else|while|for|do|using|unless|default)\\b" - }, - { - "name": "keyword.operator.comparison.dw", - "match": "(~=|==|!=|!=|\u003c=|\u003e=|\u003c|\u003e)" - }, - { - "name": "keyword.operator.assignment.dw", - "match": "(=)" - }, - { - "name": "keyword.operator.declaration.dw", - "match": "(:)" - }, - { - "name": "keyword.operator.arithmetic.dw", - "match": "(\\-|\\+|\\*|\\/)" - }, - { - "name": "keyword.other.dw", - "match": "\\b(and|or)\\b" - } - ] - }, - "match-block": { - "name": "match-block.expr.dw", - "begin": "\\{", - "end": "(?=\\})", - "patterns": [ - { - "include": "#case-clause" - }, - { - "include": "#expressions" - } - ], - "beginCaptures": { - "0": { - "name": "punctuation.definition.block.dw" - } - } - }, - "match-statement": { - "name": "match-statement.expr.dw", - "begin": "(?\u003c!\\.|\\$)\\b(match)\\s*(?=\\{)", - "end": "\\}", - "patterns": [ - { - "include": "#match-block" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.control.switch.dw" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.definition.block.dw" - } - } - }, - "ns-directive": { - "name": "meta.directive.ns.dw", - "begin": "(?\u003c!\\.|\\$)\\b(ns)\\s+([A-Za-z][a-zA-Z0-9_]*)\\s+([^\\n]*)(?!\\$|\\.)", - "end": "(?=\\n)", - "beginCaptures": { - "1": { - "name": "storage.type.dw" - }, - "2": { - "name": "entity.name.namespace.dw" - }, - "3": { - "name": "meta.definition.ns.dw string.url.dw" - } - } - }, - "object-key": { - "patterns": [ - { - "name": "meta.object.member.dw meta.object-literal.namespace.dw", - "match": "\\b([[:alpha:]][_[:alnum:]]+#)", - "captures": { - "0": { - "name": "variable.language.dw" - } - } - }, - { - "name": "meta.object.member.dw meta.object-literal.key.dw", - "begin": "(?=[\\'\\\"\\`])", - "end": "(?=@\\(|:)", - "patterns": [ - { - "include": "#strings" - } - ] - }, - { - "name": "meta.object.member.dw", - "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:|@\\()", - "end": "(?=,|\\}|\\))", - "captures": { - "1": { - "name": "meta.object-literal.key.dw" - } - } - } - ] - }, - "object-literal": { - "name": "meta.objectliteral.dw", - "begin": "\\{", - "end": "\\}", - "patterns": [ - { - "include": "#object-member" - } - ], - "beginCaptures": { - "0": { - "name": "punctuation.definition.block.dw" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.block.dw" - } - } - }, - "object-member": { - "patterns": [ - { - "include": "#comments" - }, - { - "include": "#paren-expression" - }, - { - "begin": "\\s+if\\b", - "end": "(?=,|})", - "patterns": [ - { - "include": "#expressions" - } - ], - "beginCaptures": { - "0": { - "name": "keyword.control.dw" - } - } - }, - { - "include": "#object-key" - }, - { - "include": "#attr-literal" - }, - { - "include": "#object-member-body" - }, - { - "include": "#punctuation-comma" - } - ] - }, - "object-member-body": { - "name": "meta.object.member.dw", - "begin": ":", - "end": "(?=,|\\}|\\))", - "patterns": [ - { - "include": "#expressions" - } - ], - "beginCaptures": { - "0": { - "name": "meta.object-literal.key.dw punctuation.separator.key-value.dw" - } - } - }, - "object-member-type": { - "patterns": [ - { - "include": "#comments" - }, - { - "name": "variable.language.dw", - "match": "_" - }, - { - "name": "variable.language.dw", - "match": "([a-zA-Z0-9]+#)" - }, - { - "name": "entity.name.type.dw", - "match": "\\(\\s*([a-zA-Z][a-zA-Z0-9]*)\\s*\\)" - }, - { - "name": "meta.object.member.dw", - "match": "([a-zA-Z][a-zA-Z0-9]*)" - }, - { - "include": "#strings" - }, - { - "name": "keyword.operator.optional.dw", - "match": "\\?" - }, - { - "name": "keyword.operator.optional.dw", - "match": "\\*" - }, - { - "begin": "(\\@\\()", - "end": "(\\))", - "patterns": [ - { - "include": "#punctuation-comma" - }, - { - "include": "#object-member-type" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.operator.attributes.dw" - } - }, - "endCaptures": { - "1": { - "name": "keyword.operator.attributes.dw" - } - } - }, - { - "begin": "(:)", - "end": "(?=,|}|\\)|\\|}|\\-}|\\|\\-})", - "patterns": [ - { - "include": "#types" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.operator.declaration.dw" - } - } - }, - { - "name": "invalid", - "match": "([^\\s])" - } - ] - }, - "output-directive": { - "name": "meta.directive.ns.dw", - "begin": "(?\u003c!\\.|\\$)\\b(output)\\s+([^\\n{\\s]*)(?!\\$|\\.)", - "end": "(?=\\n)", - "beginCaptures": { - "1": { - "name": "storage.type.dw" - }, - "2": { - "name": "string.other.dw" - } - } - }, - "parameters": { - "patterns": [ - { - "begin": "(:)", - "end": "(?=,|\\)|=)", - "patterns": [ - { - "include": "#types" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.operator.declaration.dw" - } - } - }, - { - "begin": "(=)", - "end": "(?=,|\\))", - "patterns": [ - { - "include": "#expressions" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.operator.declaration.dw" - } - } - }, - { - "name": "variable.parameter.dw", - "match": "\\w+" - } - ] - }, - "paren-expression": { - "begin": "(\\()", - "end": "(\\))", - "patterns": [ - { - "include": "#expressions" - } - ], - "beginCaptures": { - "1": { - "name": "punctuation.expression.begin.dw" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.expression.end.dw" - } - } - }, - "punctuation-comma": { - "name": "punctuation.separator.comma.dw", - "match": "," - }, - "qstring-backtick": { - "begin": "`", - "end": "`", - "patterns": [ - { - "include": "#template-substitution-element" - }, - { - "include": "#template-dollar" - }, - { - "include": "#string-character-escape" - }, - { - "name": "string.template.dw", - "match": "([^`])" - } - ], - "beginCaptures": { - "0": { - "name": "string.quoted.double.dw punctuation.definition.string.begin.dw" - } - }, - "endCaptures": { - "0": { - "name": "string.quoted.double.dw punctuation.definition.string.end.dw" - } - } - }, - "qstring-double": { - "begin": "\"", - "end": "\"", - "patterns": [ - { - "include": "#template-substitution-element" - }, - { - "include": "#template-dollar" - }, - { - "include": "#string-character-escape" - }, - { - "name": "string.quoted.double.dw", - "match": "([^\"])" - } - ], - "beginCaptures": { - "0": { - "name": "string.quoted.double.dw punctuation.definition.string.begin.dw" - } - }, - "endCaptures": { - "0": { - "name": "string.quoted.double.dw punctuation.definition.string.end.dw" - } - } - }, - "qstring-single": { - "begin": "'", - "end": "(\\')|((?:[^\\\\\\n])$)", - "patterns": [ - { - "include": "#template-substitution-element" - }, - { - "include": "#template-dollar" - }, - { - "include": "#string-character-escape" - }, - { - "name": "string.quoted.single.dw", - "match": "([^'])" - } - ], - "beginCaptures": { - "0": { - "name": "string.quoted.single.dw punctuation.definition.string.begin.dw" - } - }, - "endCaptures": { - "1": { - "name": "string.quoted.single.dw punctuation.definition.string.end.dw" - }, - "2": { - "name": "invalid.illegal.newline.dw" - } - } - }, - "regex": { - "patterns": [ - { - "name": "string.regexp.dw", - "begin": "(?\u003c=[=(:,\\[?+!]|replace|match|scan|matches|contains|---|case|-\u003e|and|or|\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])(?!\\s*[a-zA-Z0-9_$]))", - "end": "(/)", - "patterns": [ - { - "include": "#regexp" - } - ], - "beginCaptures": { - "1": { - "name": "punctuation.definition.string.begin.dw" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.definition.string.end.dw" - } - } - }, - { - "name": "string.regexp.dw", - "begin": "(?\u003c![_$[:alnum:])])\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])(?!\\s*[a-zA-Z0-9_$]))", - "end": "(/)", - "patterns": [ - { - "include": "#regexp" - } - ], - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.dw" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.definition.string.end.dw" - } - } - } - ] - }, - "regex-character-class": { - "patterns": [ - { - "name": "constant.other.character-class.regexp", - "match": "\\\\[wWsSdDtrnvf]|\\." - }, - { - "name": "constant.character.numeric.regexp", - "match": "\\\\([0-7]{3}|x[[:xdigit:]][[:xdigit:]]|u[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]])" - }, - { - "name": "constant.character.control.regexp", - "match": "\\\\c[A-Z]" - }, - { - "name": "constant.character.escape.backslash.regexp", - "match": "\\\\." - } - ] - }, - "regexp": { - "patterns": [ - { - "name": "keyword.control.anchor.regexp", - "match": "\\\\[bB]|\\^|\\$" - }, - { - "name": "keyword.other.back-reference.regexp", - "match": "\\\\[1-9]\\d*" - }, - { - "name": "keyword.operator.quantifier.regexp", - "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" - }, - { - "name": "keyword.operator.or.regexp", - "match": "\\|" - }, - { - "name": "meta.group.assertion.regexp", - "begin": "(\\()((\\?=)|(\\?!))", - "end": "(\\))", - "patterns": [ - { - "include": "#regexp" - } - ], - "beginCaptures": { - "1": { - "name": "punctuation.definition.group.regexp" - }, - "2": { - "name": "punctuation.definition.group.assertion.regexp" - }, - "3": { - "name": "meta.assertion.look-ahead.regexp" - }, - "4": { - "name": "meta.assertion.negative-look-ahead.regexp" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.definition.group.regexp" - } - } - }, - { - "name": "meta.group.regexp", - "begin": "\\((\\?:)?", - "end": "\\)", - "patterns": [ - { - "include": "#regexp" - } - ], - "beginCaptures": { - "0": { - "name": "punctuation.definition.group.regexp" - }, - "1": { - "name": "punctuation.definition.group.capture.regexp" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.group.regexp" - } - } - }, - { - "name": "constant.other.character-class.set.regexp", - "begin": "(\\[)(\\^)?", - "end": "(\\])", - "patterns": [ - { - "name": "constant.other.character-class.range.regexp", - "match": "(?:.|(\\\\(?:[0-7]{3}|x[[:xdigit:]][[:xdigit:]]|u[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[[:xdigit:]][[:xdigit:]]|u[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]))|(\\\\c[A-Z])|(\\\\.))", - "captures": { - "1": { - "name": "constant.character.numeric.regexp" - }, - "2": { - "name": "constant.character.control.regexp" - }, - "3": { - "name": "constant.character.escape.backslash.regexp" - }, - "4": { - "name": "constant.character.numeric.regexp" - }, - "5": { - "name": "constant.character.control.regexp" - }, - "6": { - "name": "constant.character.escape.backslash.regexp" - } - } - }, - { - "include": "#regex-character-class" - } - ], - "beginCaptures": { - "1": { - "name": "punctuation.definition.character-class.regexp" - }, - "2": { - "name": "keyword.operator.negation.regexp" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.definition.character-class.regexp" - } - } - }, - { - "include": "#regex-character-class" - } - ] - }, - "selectors": { - "name": "meta.selector.data-weave", - "begin": "(?\u003c![\\[\\(:+*/\\-])(\\s*\\.\\.\\*|\\s*\\.\\.|\\s*\\.\\*|\\s*\\.\\@|\\s*\\.#|\\s*\\.\u0026|\\s*\\.|(?=\\[)|\\:\\:)", - "end": "(?=\\s|,|\\}|\\)|\\n|\\]|\\(|-|$)", - "patterns": [ - { - "name": "meta.object.member.dw", - "match": "\\b([[:alpha:]][_[:alnum:]]+#)", - "captures": { - "0": { - "name": "variable.language.dw" - } - } - }, - { - "name": "meta.object.member.dw", - "match": "((?:[A-Za-z])([a-zA-Z0-9_]*)[?!]?|(\\$)+)" - }, - { - "include": "#strings" - }, - { - "begin": "(\\[(@|\\^)?)", - "end": "(\\])", - "patterns": [ - { - "include": "#expressions" - }, - { - "name": "invalid", - "match": "([\\)])" - } - ] - }, - { - "include": "#selectors" - } - ] - }, - "string-character-escape": { - "name": "constant.character.escape.dw", - "match": "\\\\(u[[:xdigit:]]{4}|$|.)" - }, - "strings": { - "patterns": [ - { - "include": "#qstring-single" - }, - { - "include": "#qstring-double" - }, - { - "include": "#qstring-backtick" - }, - { - "include": "#template" - } - ] - }, - "template": { - "begin": "([$[:alpha:]][_$[:alnum:]]*)\\s*(`)", - "end": "`", - "patterns": [ - { - "include": "#template-substitution-element" - }, - { - "include": "#template-dollar" - }, - { - "include": "#string-character-escape" - }, - { - "name": "string.template.dw", - "match": "([^`])" - } - ], - "beginCaptures": { - "1": { - "name": "support.function.dw" - }, - "2": { - "name": "string.template.dw punctuation.definition.string.template.begin.dw" - } - }, - "endCaptures": { - "0": { - "name": "string.template.dw punctuation.definition.string.template.end.dw" - } - } - }, - "template-dollar": { - "patterns": [ - { - "name": "variable.parameter.dw", - "match": "(\\$(\\$)+)" - }, - { - "name": "variable.parameter.dw", - "match": "(\\$)(?![a-zA-Z(])" - }, - { - "name": "variable.parameter.dw", - "match": "(\\$)([a-zA-Z][a-zA-Z0-9_]*)", - "captures": { - "1": { - "name": "keyword.other.dw" - }, - "2": { - "name": "variable.other.dw" - } - } - } - ] - }, - "template-substitution-element": { - "name": "meta.template.expression.dw", - "begin": "\\$\\(", - "end": "\\)", - "patterns": [ - { - "include": "#expressions" - } - ], - "beginCaptures": { - "0": { - "name": "keyword.other.dw" - } - }, - "endCaptures": { - "0": { - "name": "keyword.other.dw" - } - } - }, - "type-directive": { - "name": "meta.directive.type.dw", - "begin": "(\\s*(type)\\s+([a-zA-Z][a-zA-Z0-9]*))", - "end": "(?=(fun|input|output|type|var|ns|import|%dw|private|---)\\s)", - "patterns": [ - { - "begin": "\u003c", - "end": "\u003e", - "patterns": [ - { - "include": "#generics" - } - ] - }, - { - "name": "keyword.other.dw", - "match": "\\=" - }, - { - "include": "#types" - } - ], - "beginCaptures": { - "2": { - "name": "storage.type.dw" - }, - "3": { - "name": "entity.name.type.dw" - } - } - }, - "types": { - "patterns": [ - { - "include": "#comments" - }, - { - "name": "support.class.dw", - "match": "\\b(String|Boolean|Number|Range|Namespace|Uri|DateTime|LocalDateTime|Date|LocalTime|Time|TimeZone|Period|Binary|Null|Regex|Nothing|Any|Object|Key)\\b" - }, - { - "begin": "\\b(Array|Type)\\s*\u003c\\b", - "end": "\u003e", - "patterns": [ - { - "name": "invalid", - "match": "," - }, - { - "include": "#types" - } - ], - "beginCaptures": { - "1": { - "name": "support.type.dw" - } - } - }, - { - "name": "keyword.operator.declaration.dw", - "match": "(\u0026|\\|)" - }, - { - "name": "keyword.operator.declaration.dw", - "match": "\u003c:" - }, - { - "name": "support.class.dw", - "match": "\\b([A-Z][a-zA-Z0-9_]*)" - }, - { - "begin": "\u003c", - "end": "\u003e", - "patterns": [ - { - "include": "#types" - }, - { - "include": "#punctuation-comma" - }, - { - "include": "#comments" - } - ] - }, - { - "begin": "\\(", - "end": "(\\)\\s*\\-\\\u003e)", - "patterns": [ - { - "include": "#types" - }, - { - "include": "#parameters" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.operator.tuple.dw" - } - } - }, - { - "begin": "\\{\\-\\|", - "end": "\\|\\-\\}", - "patterns": [ - { - "include": "#punctuation-comma" - }, - { - "include": "#object-member-type" - } - ] - }, - { - "begin": "\\{\\|", - "end": "\\|\\}", - "patterns": [ - { - "include": "#punctuation-comma" - }, - { - "include": "#object-member-type" - } - ] - }, - { - "begin": "\\{\\-", - "end": "\\-\\}", - "patterns": [ - { - "include": "#punctuation-comma" - }, - { - "include": "#object-member-type" - } - ] - }, - { - "begin": "\\{", - "end": "\\}", - "patterns": [ - { - "include": "#punctuation-comma" - }, - { - "include": "#object-member-type" - } - ] - }, - { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#types" - } - ] - }, - { - "match": "\\b(var|fun|ns)\\b" - }, - { - "name": "invalid", - "match": "\\b(input|output|var|ns|import|try|catch|throw|do|for|yield|enum|private|async)\\b" - }, - { - "name": "invalid", - "match": "\\b(if|else|while|for|do|using|unless|default|match)\\b" - }, - { - "name": "invalid", - "match": "(~=|==|!=|===|!==|\u003c=|\u003e=|\u003c|\u003e|\\$+)" - } - ] - }, - "using-statement": { - "name": "using-statement.expr.dw", - "begin": "(?\u003c!\\.|\\$)\\b(using)\\s*(\\()", - "end": "(\\))", - "patterns": [ - { - "match": "((?:\\+\\+|\\-\\-|[A-Za-z])(?:[a-zA-Z0-9_]*))(\\s*=)", - "captures": { - "1": { - "name": "entity.name.variable.dw" - }, - "2": { - "name": "keyword.operator.dw" - } - } - }, - { - "include": "#expressions" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.control.using.dw" - }, - "2": { - "name": "punctuation.definitions.begin.dw" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.definitions.end.dw" - } - } - }, - "var-directive": { - "name": "meta.directive.var.dw", - "begin": "(\\s*(var)\\s+([a-zA-Z][a-zA-Z0-9]*))", - "end": "(=)", - "patterns": [ - { - "begin": "\u003c", - "end": "\u003e", - "patterns": [ - { - "include": "#generics" - } - ] - }, - { - "begin": "(:)", - "end": "(?==|$)", - "patterns": [ - { - "include": "#comments" - }, - { - "include": "#types" - } - ], - "beginCaptures": { - "1": { - "name": "keyword.operator.declaration.dw" - } - } - } - ], - "beginCaptures": { - "2": { - "name": "storage.type.dw" - }, - "3": { - "name": "entity.name.variable.dw" - } - }, - "endCaptures": { - "0": { - "name": "keyword.operator.assignment.dw" - } - } - }, - "variable-reference": { - "patterns": [ - { - "name": "variable.other.dw", - "match": "\\b(?!(fun|input|output|type|var|ns|import|%dw|private|---)\\b)((\\+\\+|\\-\\-|[A-Za-z])[a-zA-Z0-9_]*)" - }, - { - "name": "invalid", - "match": "\\b(fun|input|output|type|var|ns|import|private)\\b" - }, - { - "name": "variable.parameter.dw", - "match": "(\\$+)" - } - ] - } - } -} +{"name":"DataWeave","scopeName":"source.data-weave","patterns":[{"include":"#comments"},{"include":"#directives"},{"name":"keyword.operator.body-marker.dw","match":"(---)"},{"include":"#expressions"},{"name":"invalid","match":"([^\\s]+)"}],"repository":{"array-literal":{"name":"meta.array.literal.dw","begin":"(?\u003c!\\w|}|])(\\[)","end":"\\]","patterns":[{"include":"#expressions"},{"include":"#punctuation-comma"}],"beginCaptures":{"0":{"name":"meta.brace.square.dw"}},"endCaptures":{"0":{"name":"meta.brace.square.dw"}}},"attr-literal":{"name":"meta.attributes.dw","begin":"\\@\\(","end":"\\)","patterns":[{"include":"#object-member"}],"beginCaptures":{"0":{"name":"keyword.operator.attributes.dw"}},"endCaptures":{"0":{"name":"keyword.operator.attributes.dw"}}},"case-clause":{"name":"case-clause.expr.dw","begin":"(?\u003c!\\.|\\$)\\b(case|else(?=\\s*-\u003e))\\b(?!\\$|\\.)","end":"\\-\\\u003e","patterns":[{"begin":"(?\u003c!\\.|\\$)\\b(is)\\s+","end":"(?=\\-\\\u003e)","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"keyword.control.is.dw"}}},{"begin":"(?\u003c!\\.|\\$)\\b(matches)\\b","end":"(?=\\-\\\u003e)","patterns":[{"include":"#expressions"}],"beginCaptures":{"1":{"name":"keyword.control.matches.dw"}}},{"begin":"(?\u003c!\\.|\\$)\\b([A-Za-z][a-zA-Z0-9_]*)\\s*:\\s+","end":"(?=\\-\\\u003e)","patterns":[{"include":"#expressions"}],"beginCaptures":{"1":{"name":"entity.name.variable.dw"}}},{"begin":"(?\u003c!\\.|\\$)\\b([A-Za-z][a-zA-Z0-9_]*)\\s*(if|matches)\\s+","end":"(?=\\-\\\u003e)","patterns":[{"include":"#expressions"}],"beginCaptures":{"1":{"name":"entity.name.variable.dw"},"2":{"name":"keyword.control.if.dw"}}},{"include":"#expressions"}],"beginCaptures":{"1":{"name":"keyword.control.switch.dw"}},"endCaptures":{"0":{"name":"keyword.control.switch.dw"}}},"cast":{"begin":"(?\u003c!\\.|\\$)\\b(as|is)\\s+","end":"(?=$|^|[;,:})\\]\\s])","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"keyword.control.as.dw"}}},"comments":{"patterns":[{"name":"comment.block.dw","begin":"/\\*","end":"\\*/","captures":{"0":{"name":"punctuation.definition.comment.dw"}}},{"match":"\\s*((//).*$\\n?)","captures":{"1":{"name":"comment.line.double-slash.dw"},"2":{"name":"punctuation.definition.comment.dw"}}}]},"constants":{"patterns":[{"name":"constant.language.dw","match":"\\b(true|false|null)\\b"},{"name":"constant.numeric.dw","match":"\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDd]|UL|ul)?\\b"},{"begin":"\\|","end":"\\|","patterns":[{"name":"constant.numeric.dw","match":"([0-9]+)"},{"name":"constant.character.escape.dw","match":"([+:\\-WYMDTHSPZ\\.])"},{"name":"invalid","match":"([^\\|])"}],"beginCaptures":{"0":{"name":"constant.numeric.dw"}},"endCaptures":{"0":{"name":"constant.numeric.dw"}}}]},"directives":{"patterns":[{"include":"#dw-directive"},{"include":"#import-directive"},{"include":"#type-directive"},{"include":"#fun-directive"},{"include":"#var-directive"},{"include":"#ns-directive"},{"include":"#input-directive"},{"include":"#output-directive"}]},"do-statement":{"name":"do-statement.expr.dw","begin":"(?\u003c!\\.|\\$)\\b(do)\\s*(\\{)","end":"(\\})","patterns":[{"include":"#comments"},{"include":"#directives"},{"name":"keyword.operator.body-marker.dw","match":"(---)"},{"include":"#expressions"},{"name":"invalid","match":"([^\\s]+)"}],"beginCaptures":{"1":{"name":"keyword.control.do.dw"},"2":{"name":"punctuation.definitions.begin.dw"}},"endCaptures":{"1":{"name":"punctuation.definitions.end.dw"}}},"dw-directive":{"name":"meta.directive.version.dw","begin":"(?\u003c!\\.|\\$)(%dw)\\s+([0-9]\\.[0-9])(?!\\$|\\.)","end":"(?=\\n)","beginCaptures":{"1":{"name":"comment.dw"},"2":{"name":"comment.dw"}}},"expressions":{"name":"expression","patterns":[{"name":"keyword.other.dw","match":"\\b(not)\\s+"},{"include":"#paren-expression"},{"include":"#strings"},{"include":"#constants"},{"include":"#comments"},{"include":"#match-statement"},{"include":"#using-statement"},{"include":"#do-statement"},{"include":"#if-statement"},{"include":"#regex"},{"include":"#keywords"},{"include":"#object-literal"},{"include":"#array-literal"},{"include":"#cast"},{"include":"#object-member"},{"include":"#variable-reference"},{"include":"#selectors"},{"include":"#directives"},{"include":"#infix"}]},"fun-directive":{"name":"meta.directive.fun.dw","begin":"(\\s*(fun)\\s+([a-zA-Z][a-zA-Z0-9]*))","end":"(=)","patterns":[{"begin":"\u003c","end":"\u003e","patterns":[{"include":"#generics"}]},{"begin":"\\(","end":"\\)","patterns":[{"include":"#parameters"}]},{"begin":"(:)","end":"(?==)","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"keyword.operator.declaration.dw"}}}],"beginCaptures":{"2":{"name":"storage.type.dw"},"3":{"name":"entity.name.function.dw"}},"endCaptures":{"0":{"name":"keyword.operator.assignment.dw"}}},"function_call":{"name":"function_call","begin":"\\s*\\(","end":"\\s*\\)","patterns":[{"include":"#punctuation-comma"},{"include":"#expressions"}]},"generics":{"patterns":[{"begin":"(:)","end":"(?=,|\u003e)","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"keyword.operator.declaration.dw"}}},{"name":"keyword.operator.extends.dw","match":"\u003c:"},{"include":"#keywords"},{"name":"entity.name.type.parameter.dw","match":"\\w+"}]},"if-statement":{"name":"meta.if.dw","begin":"(?\u003c!\\.|\\$)\\b(if\\s*)\\(","end":"\\)","patterns":[{"include":"#expressions"}],"beginCaptures":{"1":{"name":"keyword.control.if.dw"}}},"import-directive":{"name":"meta.directive.import.dw","begin":"(\\s*(import)\\s+)","end":"(?=(fun|input|output|type|var|ns|import|%dw|private|---)\\s|$)","patterns":[{"include":"#comments"},{"match":"(,)"},{"match":"(\\*)"},{"match":"\\b(from)\\s+","captures":{"1":{"name":"storage.type.dw"}}},{"name":"entity.name.other.dw","match":"(?:[a-zA-Z][a-zA-Z0-9]*(?:::[a-zA-Z][a-zA-Z0-9]*)*)\n"},{"match":"\\s+(as)\\s+([a-zA-Z][a-zA-Z0-9]*)","captures":{"1":{"name":"keyword.other.dw"},"2":{"name":"entity.name.other.dw"}}}],"beginCaptures":{"2":{"name":"storage.type.dw"}}},"infix":{"name":"support.function.dw","match":"(?\u003c!^|,|\\[|\\(|=|\\+|\u003e|\u003c|\\-|\\*|:|\\{|case|is|else|not|as|and|or)(?\u003c=[a-zA-Z0-9_$\\}\\])\"'`|/])\\s*(?!(var|match|case|else|fun|input|output|is|as|default|ns|import|null|false|true|using|do|not|and|or)\\s)(\\+\\+|\\-\\-|[a-zA-Z][a-zA-Z_0-9]*)(\\s+|\\s*(?=[\"'/|{]))"},"input-directive":{"name":"meta.directive.ns.dw","begin":"(?\u003c!\\.|\\$)\\b(input)\\s+([[:alpha:]][[:alnum:]]*)\\s*","end":"(?=\\n)","patterns":[{"begin":"(\\:\\s*)","end":"(\\s|\\n)","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"keyword.other.dw"}}},{"name":"string.mime.dw","match":"([^{\\n\\s])"}],"beginCaptures":{"1":{"name":"storage.type.dw"},"2":{"name":"entity.name.variable.dw"}}},"keywords":{"patterns":[{"name":"keyword.reserved.dw","match":"\\b(throw|for|yield|enum|private|async)\\b"},{"name":"invalid","match":"\\b(not)\\b"},{"name":"keyword.control.dw","match":"\\b(if|else|while|for|do|using|unless|default)\\b"},{"name":"keyword.operator.comparison.dw","match":"(~=|==|!=|!=|\u003c=|\u003e=|\u003c|\u003e)"},{"name":"keyword.operator.assignment.dw","match":"(=)"},{"name":"keyword.operator.declaration.dw","match":"(:)"},{"name":"keyword.operator.arithmetic.dw","match":"(\\-|\\+|\\*|\\/)"},{"name":"keyword.other.dw","match":"\\b(and|or)\\b"}]},"match-block":{"name":"match-block.expr.dw","begin":"\\{","end":"(?=\\})","patterns":[{"include":"#case-clause"},{"include":"#expressions"}],"beginCaptures":{"0":{"name":"punctuation.definition.block.dw"}}},"match-statement":{"name":"match-statement.expr.dw","begin":"(?\u003c!\\.|\\$)\\b(match)\\s*(?=\\{)","end":"\\}","patterns":[{"include":"#match-block"}],"beginCaptures":{"1":{"name":"keyword.control.switch.dw"}},"endCaptures":{"1":{"name":"punctuation.definition.block.dw"}}},"ns-directive":{"name":"meta.directive.ns.dw","begin":"(?\u003c!\\.|\\$)\\b(ns)\\s+([A-Za-z][a-zA-Z0-9_]*)\\s+([^\\n]*)(?!\\$|\\.)","end":"(?=\\n)","beginCaptures":{"1":{"name":"storage.type.dw"},"2":{"name":"entity.name.namespace.dw"},"3":{"name":"meta.definition.ns.dw string.url.dw"}}},"object-key":{"patterns":[{"name":"meta.object.member.dw meta.object-literal.namespace.dw","match":"\\b([[:alpha:]][_[:alnum:]]+#)","captures":{"0":{"name":"variable.language.dw"}}},{"name":"meta.object.member.dw meta.object-literal.key.dw","begin":"(?=[\\'\\\"\\`])","end":"(?=@\\(|:)","patterns":[{"include":"#strings"}]},{"name":"meta.object.member.dw","match":"(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:|@\\()","end":"(?=,|\\}|\\))","captures":{"1":{"name":"meta.object-literal.key.dw"}}}]},"object-literal":{"name":"meta.objectliteral.dw","begin":"\\{","end":"\\}","patterns":[{"include":"#object-member"}],"beginCaptures":{"0":{"name":"punctuation.definition.block.dw"}},"endCaptures":{"0":{"name":"punctuation.definition.block.dw"}}},"object-member":{"patterns":[{"include":"#comments"},{"include":"#paren-expression"},{"begin":"\\s+if\\b","end":"(?=,|})","patterns":[{"include":"#expressions"}],"beginCaptures":{"0":{"name":"keyword.control.dw"}}},{"include":"#object-key"},{"include":"#attr-literal"},{"include":"#object-member-body"},{"include":"#punctuation-comma"}]},"object-member-body":{"name":"meta.object.member.dw","begin":":","end":"(?=,|\\}|\\))","patterns":[{"include":"#expressions"}],"beginCaptures":{"0":{"name":"meta.object-literal.key.dw punctuation.separator.key-value.dw"}}},"object-member-type":{"patterns":[{"include":"#comments"},{"name":"variable.language.dw","match":"_"},{"name":"variable.language.dw","match":"([a-zA-Z0-9]+#)"},{"name":"entity.name.type.dw","match":"\\(\\s*([a-zA-Z][a-zA-Z0-9]*)\\s*\\)"},{"name":"meta.object.member.dw","match":"([a-zA-Z][a-zA-Z0-9]*)"},{"include":"#strings"},{"name":"keyword.operator.optional.dw","match":"\\?"},{"name":"keyword.operator.optional.dw","match":"\\*"},{"begin":"(\\@\\()","end":"(\\))","patterns":[{"include":"#punctuation-comma"},{"include":"#object-member-type"}],"beginCaptures":{"1":{"name":"keyword.operator.attributes.dw"}},"endCaptures":{"1":{"name":"keyword.operator.attributes.dw"}}},{"begin":"(:)","end":"(?=,|}|\\)|\\|}|\\-}|\\|\\-})","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"keyword.operator.declaration.dw"}}},{"name":"invalid","match":"([^\\s])"}]},"output-directive":{"name":"meta.directive.ns.dw","begin":"(?\u003c!\\.|\\$)\\b(output)\\s+([^\\n{\\s]*)(?!\\$|\\.)","end":"(?=\\n)","beginCaptures":{"1":{"name":"storage.type.dw"},"2":{"name":"string.other.dw"}}},"parameters":{"patterns":[{"begin":"(:)","end":"(?=,|\\)|=)","patterns":[{"include":"#types"}],"beginCaptures":{"1":{"name":"keyword.operator.declaration.dw"}}},{"begin":"(=)","end":"(?=,|\\))","patterns":[{"include":"#expressions"}],"beginCaptures":{"1":{"name":"keyword.operator.declaration.dw"}}},{"name":"variable.parameter.dw","match":"\\w+"}]},"paren-expression":{"begin":"(\\()","end":"(\\))","patterns":[{"include":"#expressions"}],"beginCaptures":{"1":{"name":"punctuation.expression.begin.dw"}},"endCaptures":{"1":{"name":"punctuation.expression.end.dw"}}},"punctuation-comma":{"name":"punctuation.separator.comma.dw","match":","},"qstring-backtick":{"begin":"`","end":"`","patterns":[{"include":"#template-substitution-element"},{"include":"#template-dollar"},{"include":"#string-character-escape"},{"name":"string.template.dw","match":"([^`])"}],"beginCaptures":{"0":{"name":"string.quoted.double.dw punctuation.definition.string.begin.dw"}},"endCaptures":{"0":{"name":"string.quoted.double.dw punctuation.definition.string.end.dw"}}},"qstring-double":{"begin":"\"","end":"\"","patterns":[{"include":"#template-substitution-element"},{"include":"#template-dollar"},{"include":"#string-character-escape"},{"name":"string.quoted.double.dw","match":"([^\"])"}],"beginCaptures":{"0":{"name":"string.quoted.double.dw punctuation.definition.string.begin.dw"}},"endCaptures":{"0":{"name":"string.quoted.double.dw punctuation.definition.string.end.dw"}}},"qstring-single":{"begin":"'","end":"(\\')|((?:[^\\\\\\n])$)","patterns":[{"include":"#template-substitution-element"},{"include":"#template-dollar"},{"include":"#string-character-escape"},{"name":"string.quoted.single.dw","match":"([^'])"}],"beginCaptures":{"0":{"name":"string.quoted.single.dw punctuation.definition.string.begin.dw"}},"endCaptures":{"1":{"name":"string.quoted.single.dw punctuation.definition.string.end.dw"},"2":{"name":"invalid.illegal.newline.dw"}}},"regex":{"patterns":[{"name":"string.regexp.dw","begin":"(?\u003c=[=(:,\\[?+!]|replace|match|scan|matches|contains|---|case|-\u003e|and|or|\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])(?!\\s*[a-zA-Z0-9_$]))","end":"(/)","patterns":[{"include":"#regexp"}],"beginCaptures":{"1":{"name":"punctuation.definition.string.begin.dw"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.dw"}}},{"name":"string.regexp.dw","begin":"(?\u003c![_$[:alnum:])])\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])(?!\\s*[a-zA-Z0-9_$]))","end":"(/)","patterns":[{"include":"#regexp"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.dw"}},"endCaptures":{"1":{"name":"punctuation.definition.string.end.dw"}}}]},"regex-character-class":{"patterns":[{"name":"constant.other.character-class.regexp","match":"\\\\[wWsSdDtrnvf]|\\."},{"name":"constant.character.numeric.regexp","match":"\\\\([0-7]{3}|x[[:xdigit:]][[:xdigit:]]|u[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]])"},{"name":"constant.character.control.regexp","match":"\\\\c[A-Z]"},{"name":"constant.character.escape.backslash.regexp","match":"\\\\."}]},"regexp":{"patterns":[{"name":"keyword.control.anchor.regexp","match":"\\\\[bB]|\\^|\\$"},{"name":"keyword.other.back-reference.regexp","match":"\\\\[1-9]\\d*"},{"name":"keyword.operator.quantifier.regexp","match":"[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"},{"name":"keyword.operator.or.regexp","match":"\\|"},{"name":"meta.group.assertion.regexp","begin":"(\\()((\\?=)|(\\?!))","end":"(\\))","patterns":[{"include":"#regexp"}],"beginCaptures":{"1":{"name":"punctuation.definition.group.regexp"},"2":{"name":"punctuation.definition.group.assertion.regexp"},"3":{"name":"meta.assertion.look-ahead.regexp"},"4":{"name":"meta.assertion.negative-look-ahead.regexp"}},"endCaptures":{"1":{"name":"punctuation.definition.group.regexp"}}},{"name":"meta.group.regexp","begin":"\\((\\?:)?","end":"\\)","patterns":[{"include":"#regexp"}],"beginCaptures":{"0":{"name":"punctuation.definition.group.regexp"},"1":{"name":"punctuation.definition.group.capture.regexp"}},"endCaptures":{"0":{"name":"punctuation.definition.group.regexp"}}},{"name":"constant.other.character-class.set.regexp","begin":"(\\[)(\\^)?","end":"(\\])","patterns":[{"name":"constant.other.character-class.range.regexp","match":"(?:.|(\\\\(?:[0-7]{3}|x[[:xdigit:]][[:xdigit:]]|u[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[[:xdigit:]][[:xdigit:]]|u[[:xdigit:]][[:xdigit:]][[:xdigit:]][[:xdigit:]]))|(\\\\c[A-Z])|(\\\\.))","captures":{"1":{"name":"constant.character.numeric.regexp"},"2":{"name":"constant.character.control.regexp"},"3":{"name":"constant.character.escape.backslash.regexp"},"4":{"name":"constant.character.numeric.regexp"},"5":{"name":"constant.character.control.regexp"},"6":{"name":"constant.character.escape.backslash.regexp"}}},{"include":"#regex-character-class"}],"beginCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"},"2":{"name":"keyword.operator.negation.regexp"}},"endCaptures":{"1":{"name":"punctuation.definition.character-class.regexp"}}},{"include":"#regex-character-class"}]},"selectors":{"name":"meta.selector.data-weave","begin":"(?\u003c![\\[\\(:+*/\\-])(\\s*\\.\\.\\*|\\s*\\.\\.|\\s*\\.\\*|\\s*\\.\\@|\\s*\\.#|\\s*\\.\u0026|\\s*\\.|(?=\\[)|\\:\\:)","end":"(?=\\s|,|\\}|\\)|\\n|\\]|\\(|-|$)","patterns":[{"name":"meta.object.member.dw","match":"\\b([[:alpha:]][_[:alnum:]]+#)","captures":{"0":{"name":"variable.language.dw"}}},{"name":"meta.object.member.dw","match":"((?:[A-Za-z])([a-zA-Z0-9_]*)[?!]?|(\\$)+)"},{"include":"#strings"},{"begin":"(\\[(@|\\^)?)","end":"(\\])","patterns":[{"include":"#expressions"},{"name":"invalid","match":"([\\)])"}]},{"include":"#selectors"}]},"string-character-escape":{"name":"constant.character.escape.dw","match":"\\\\(u[[:xdigit:]]{4}|$|.)"},"strings":{"patterns":[{"include":"#qstring-single"},{"include":"#qstring-double"},{"include":"#qstring-backtick"},{"include":"#template"}]},"template":{"begin":"([$[:alpha:]][_$[:alnum:]]*)\\s*(`)","end":"`","patterns":[{"include":"#template-substitution-element"},{"include":"#template-dollar"},{"include":"#string-character-escape"},{"name":"string.template.dw","match":"([^`])"}],"beginCaptures":{"1":{"name":"support.function.dw"},"2":{"name":"string.template.dw punctuation.definition.string.template.begin.dw"}},"endCaptures":{"0":{"name":"string.template.dw punctuation.definition.string.template.end.dw"}}},"template-dollar":{"patterns":[{"name":"variable.parameter.dw","match":"(\\$(\\$)+)"},{"name":"variable.parameter.dw","match":"(\\$)(?![a-zA-Z(])"},{"name":"variable.parameter.dw","match":"(\\$)([a-zA-Z][a-zA-Z0-9_]*)","captures":{"1":{"name":"keyword.other.dw"},"2":{"name":"variable.other.dw"}}}]},"template-substitution-element":{"name":"meta.template.expression.dw","begin":"\\$\\(","end":"\\)","patterns":[{"include":"#expressions"}],"beginCaptures":{"0":{"name":"keyword.other.dw"}},"endCaptures":{"0":{"name":"keyword.other.dw"}}},"type-directive":{"name":"meta.directive.type.dw","begin":"(\\s*(type)\\s+([a-zA-Z][a-zA-Z0-9]*))","end":"(?=(fun|input|output|type|var|ns|import|%dw|private|---)\\s)","patterns":[{"begin":"\u003c","end":"\u003e","patterns":[{"include":"#generics"}]},{"name":"keyword.other.dw","match":"\\="},{"include":"#types"}],"beginCaptures":{"2":{"name":"storage.type.dw"},"3":{"name":"entity.name.type.dw"}}},"types":{"patterns":[{"include":"#comments"},{"name":"support.class.dw","match":"\\b(String|Boolean|Number|Range|Namespace|Uri|DateTime|LocalDateTime|Date|LocalTime|Time|TimeZone|Period|Binary|Null|Regex|Nothing|Any|Object|Key)\\b"},{"begin":"\\b(Array|Type)\\s*\u003c\\b","end":"\u003e","patterns":[{"name":"invalid","match":","},{"include":"#types"}],"beginCaptures":{"1":{"name":"support.type.dw"}}},{"name":"keyword.operator.declaration.dw","match":"(\u0026|\\|)"},{"name":"keyword.operator.declaration.dw","match":"\u003c:"},{"name":"support.class.dw","match":"\\b([A-Z][a-zA-Z0-9_]*)"},{"begin":"\u003c","end":"\u003e","patterns":[{"include":"#types"},{"include":"#punctuation-comma"},{"include":"#comments"}]},{"begin":"\\(","end":"(\\)\\s*\\-\\\u003e)","patterns":[{"include":"#types"},{"include":"#parameters"}],"beginCaptures":{"1":{"name":"keyword.operator.tuple.dw"}}},{"begin":"\\{\\-\\|","end":"\\|\\-\\}","patterns":[{"include":"#punctuation-comma"},{"include":"#object-member-type"}]},{"begin":"\\{\\|","end":"\\|\\}","patterns":[{"include":"#punctuation-comma"},{"include":"#object-member-type"}]},{"begin":"\\{\\-","end":"\\-\\}","patterns":[{"include":"#punctuation-comma"},{"include":"#object-member-type"}]},{"begin":"\\{","end":"\\}","patterns":[{"include":"#punctuation-comma"},{"include":"#object-member-type"}]},{"begin":"\\(","end":"\\)","patterns":[{"include":"#types"}]},{"match":"\\b(var|fun|ns)\\b"},{"name":"invalid","match":"\\b(input|output|var|ns|import|try|catch|throw|do|for|yield|enum|private|async)\\b"},{"name":"invalid","match":"\\b(if|else|while|for|do|using|unless|default|match)\\b"},{"name":"invalid","match":"(~=|==|!=|===|!==|\u003c=|\u003e=|\u003c|\u003e|\\$+)"}]},"using-statement":{"name":"using-statement.expr.dw","begin":"(?\u003c!\\.|\\$)\\b(using)\\s*(\\()","end":"(\\))","patterns":[{"match":"((?:\\+\\+|\\-\\-|[A-Za-z])(?:[a-zA-Z0-9_]*))(\\s*=)","captures":{"1":{"name":"entity.name.variable.dw"},"2":{"name":"keyword.operator.dw"}}},{"include":"#expressions"}],"beginCaptures":{"1":{"name":"keyword.control.using.dw"},"2":{"name":"punctuation.definitions.begin.dw"}},"endCaptures":{"1":{"name":"punctuation.definitions.end.dw"}}},"var-directive":{"name":"meta.directive.var.dw","begin":"(\\s*(var)\\s+([a-zA-Z][a-zA-Z0-9]*))","end":"(=)","patterns":[{"begin":"\u003c","end":"\u003e","patterns":[{"include":"#generics"}]},{"begin":"(:)","end":"(?==|$)","patterns":[{"include":"#comments"},{"include":"#types"}],"beginCaptures":{"1":{"name":"keyword.operator.declaration.dw"}}}],"beginCaptures":{"2":{"name":"storage.type.dw"},"3":{"name":"entity.name.variable.dw"}},"endCaptures":{"0":{"name":"keyword.operator.assignment.dw"}}},"variable-reference":{"patterns":[{"name":"variable.other.dw","match":"\\b(?!(fun|input|output|type|var|ns|import|%dw|private|---)\\b)((\\+\\+|\\-\\-|[A-Za-z])[a-zA-Z0-9_]*)"},{"name":"invalid","match":"\\b(fun|input|output|type|var|ns|import|private)\\b"},{"name":"variable.parameter.dw","match":"(\\$+)"}]}}}