{ "name": "powerquery", "scopeName": "source.powerquery", "fileTypes": ["pq", "pqm"], "uuid": "41968B57-12E6-4AC5-92A4-A837010E8B0A", "patterns": [ { "include": "#Noise" }, { "include": "#LiteralExpression" }, { "include": "#Keywords" }, { "include": "#ImplicitVariable" }, { "include": "#IntrinsicVariable" }, { "include": "#Operators" }, { "include": "#DotOperators" }, { "include": "#TypeName" }, { "include": "#RecordExpression" }, { "include": "#Punctuation" }, { "include": "#QuotedIdentifier" }, { "include": "#Identifier" } ], "repository": { "Keywords": { "match": "\\b(?:(and|or|not)|(if|then|else)|(try|otherwise)|(as|each|in|is|let|meta|type|error)|(section|shared))\\b", "captures": { "1": { "name": "keyword.operator.word.logical.powerquery" }, "2": { "name": "keyword.control.conditional.powerquery" }, "3": { "name": "keyword.control.exception.powerquery" }, "4": { "name": "keyword.other.powerquery" }, "5": { "name": "keyword.powerquery" } } }, "TypeName": { "match": "\\b(?:(optional|nullable)|(action|any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|null|number|record|table|text|type))\\b", "captures": { "1": { "name": "storage.modifier.powerquery" }, "2": { "name": "storage.type.powerquery" } } }, "LiteralExpression": { "patterns": [ { "include": "#String" }, { "include": "#NumericConstant" }, { "include": "#LogicalConstant" }, { "include": "#NullConstant" }, { "include": "#FloatNumber" }, { "include": "#DecimalNumber" }, { "include": "#HexNumber" }, { "include": "#IntNumber" } ] }, "Noise": { "patterns": [ { "include": "#BlockComment" }, { "include": "#LineComment" }, { "include": "#Whitespace" } ] }, "Whitespace": { "match": "\\s+" }, "BlockComment": { "begin": "/\\*", "end": "\\*/", "name": "comment.block.powerquery" }, "LineComment": { "match": "//.*", "name": "comment.line.double-slash.powerquery" }, "String": { "begin": "\"", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.powerquery" } }, "end": "\"(?!\")", "endCaptures": { "0": { "name": "punctuation.definition.string.end.powerquery" } }, "patterns": [ { "match": "\"\"", "name": "constant.character.escape.quote.powerquery" }, { "include": "#EscapeSequence" } ], "name": "string.quoted.double.powerquery" }, "QuotedIdentifier": { "begin": "#\"", "beginCaptures": { "0": { "name": "punctuation.definition.quotedidentifier.begin.powerquery" } }, "end": "\"(?!\")", "endCaptures": { "0": { "name": "punctuation.definition.quotedidentifier.end.powerquery" } }, "patterns": [ { "match": "\"\"", "name": "constant.character.escape.quote.powerquery" }, { "include": "#EscapeSequence" } ], "name": "entity.name.powerquery" }, "EscapeSequence": { "begin": "#\\(", "beginCaptures": { "0": { "name": "punctuation.definition.escapesequence.begin.powerquery" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.escapesequence.end.powerquery" } }, "patterns": [ { "match": "(#|\\h{4}|\\h{8}|cr|lf|tab)(?:,(#|\\h{4}|\\h{8}|cr|lf|tab))*" }, { "match": "[^\\)]", "name": "invalid.illegal.escapesequence.powerquery" } ], "name": "constant.character.escapesequence.powerquery" }, "LogicalConstant": { "match": "\\b(true|false)\\b", "name": "constant.language.logical.powerquery" }, "NullConstant": { "match": "\\b(null)\\b", "name": "constant.language.null.powerquery" }, "NumericConstant": { "match": "(?)|(=)|(<>|<|>|<=|>=)|(&)|(\\+|-|\\*|\\/)|(!)|(\\?)", "captures": { "1": { "name": "keyword.operator.function.powerquery" }, "2": { "name": "keyword.operator.assignment-or-comparison.powerquery" }, "3": { "name": "keyword.operator.comparison.powerquery" }, "4": { "name": "keyword.operator.combination.powerquery" }, "5": { "name": "keyword.operator.arithmetic.powerquery" }, "6": { "name": "keyword.operator.sectionaccess.powerquery" }, "7": { "name": "keyword.operator.optional.powerquery" } } }, "DotOperators": { "match": "(?