├── .gitignore ├── .vscode └── launch.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── media └── bazel-logo.png ├── package-lock.json ├── package.json ├── releasing.md ├── samples ├── BUILD ├── BUILD.bazel └── WORKSPACE ├── snippets ├── .DS_Store └── bazel.json ├── syntax ├── MagicPython.license ├── MagicPython.tmLanguage.json ├── MagicRegExp.tmLanguage.json └── bazel-configuration.json └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | // A launch configuration that launches the extension inside a new window 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | { 6 | "version": "0.2.0", 7 | "configurations": [ 8 | { 9 | "name": "Extension", 10 | "type": "extensionHost", 11 | "request": "launch", 12 | "args": [ 13 | "--extensionDevelopmentPath=${workspaceFolder}" 14 | ] 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/test/** 4 | test/** 5 | src/** 6 | **/*.map 7 | .gitignore 8 | tsconfig.json 9 | vsc-extension-quickstart.md 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.2.1 2 | 3 | - Updated the readme to indicate that this extension has been discontinued. 4 | 5 | ## 0.2.0 6 | 7 | - Update the extension to a modern VS Code extension config 8 | - require VS Code runtime version `1.75.0` 9 | - remove the (buildifier based) bazel format command 10 | 11 | ## 0.1.9 12 | 13 | - no longer use a wildcard pattern to match build filed (`BUILD.*`) (@Helcaraxan) 14 | - add support for `.bzl` and `.BUILD` file names (@damienpontifex) 15 | - add several Bazel related snippets (@damienpontifex) 16 | 17 | ## 0.1.8 18 | - use `which` to try and locate buildifier when formatting 19 | 20 | ## 0.1.6 21 | - add syntax highlighting for `BUILD.*` files 22 | 23 | ## 0.1.4 24 | - added formatting support 25 | 26 | ## 0.1.0 27 | - initial version 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2016, Devon Carew 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # bazel-code 2 | 3 | ## Status: discontinued 4 | 5 | Note: this extension has been discontinued. We recommend you instead try the 6 | [Bazel](https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel) 7 | extension from the Bazel team. 8 | 9 | ## Documentation 10 | 11 | A Bazel plugin for VSCode. 12 | 13 | This plugin provides basic syntax highlighting for Bazel `BUILD` and `WORKSPACE` 14 | files. See [bazel.io](https://www.bazel.io/) for more information about Bazel. 15 | 16 | [marketplace.visualstudio.com/bazel-code](https://marketplace.visualstudio.com/items?itemName=DevonDCarew.bazel-code) 17 | -------------------------------------------------------------------------------- /media/bazel-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devoncarew/bazel-code/835b0c7a7f6e03a39ef29da739e9b728d0f64b64/media/bazel-logo.png -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bazel-code", 3 | "version": "0.2.1", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "bazel-code", 9 | "version": "0.2.1", 10 | "license": "SEE LICENSE IN LICENSE", 11 | "engines": { 12 | "vscode": "^1.75.0" 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bazel-code", 3 | "displayName": "Bazel", 4 | "description": "Bazel support for Visual Studio Code.", 5 | "version": "0.2.1", 6 | "publisher": "DevonDCarew", 7 | "license": "SEE LICENSE IN LICENSE", 8 | "engines": { 9 | "vscode": "^1.75.0" 10 | }, 11 | "categories": [ 12 | "Programming Languages" 13 | ], 14 | "repository": { 15 | "type": "git", 16 | "url": "https://github.com/devoncarew/bazel-code.git" 17 | }, 18 | "icon": "media/bazel-logo.png", 19 | "contributes": { 20 | "languages": [ 21 | { 22 | "id": "bazel", 23 | "extensions": [ 24 | ".bzl", 25 | ".BUILD" 26 | ], 27 | "filenames": [ 28 | "BUILD", 29 | "BUILD.bazel", 30 | "WORKSPACE" 31 | ], 32 | "aliases": [ 33 | "Bazel" 34 | ], 35 | "configuration": "./syntax/bazel-configuration.json" 36 | } 37 | ], 38 | "grammars": [ 39 | { 40 | "language": "bazel", 41 | "scopeName": "source.bazel", 42 | "path": "./syntax/MagicPython.tmLanguage.json" 43 | }, 44 | { 45 | "scopeName": "source.regexp.python", 46 | "path": "./syntax/MagicRegExp.tmLanguage.json" 47 | } 48 | ], 49 | "snippets": [ 50 | { 51 | "language": "bazel", 52 | "path": "./snippets/bazel.json" 53 | } 54 | ] 55 | } 56 | } -------------------------------------------------------------------------------- /releasing.md: -------------------------------------------------------------------------------- 1 | ## Releasing 2 | 3 | - make sure the CHANGELOG.md entries are up-to-date 4 | - rev. the CHANGELOG.md version for the release to the anticipated version 5 | number 6 | - install the `vsce` tool (see 7 | https://code.visualstudio.com/docs/extensions/publish-extension) 8 | - run `vsce publish patch` (or `minor` for minor releases); as part of this, the 9 | plugin version in package.json will be autimatically updated 10 | -------------------------------------------------------------------------------- /samples/BUILD: -------------------------------------------------------------------------------- 1 | # Description: Blaze plugin for various IntelliJ products. 2 | 3 | # IJwB tests, run with an IntelliJ plugin SDK 4 | test_suite( 5 | name = "ijwb_tests", 6 | tests = [ 7 | "//base:integration_tests", 8 | "//base:unit_tests", 9 | "//java:integration_tests", 10 | "//java:unit_tests", 11 | "//plugin_dev:integration_tests", 12 | ], 13 | ) 14 | 15 | # ASwB tests, run with an Android Studio plugin SDK 16 | test_suite( 17 | name = "aswb_tests", 18 | tests = [ 19 | "//aswb:unit_tests", 20 | "//base:unit_tests", 21 | "//java:unit_tests", 22 | ], 23 | ) 24 | 25 | # CLwB tests, run with a CLion plugin SDK 26 | test_suite( 27 | name = "clwb_tests", 28 | tests = [ 29 | "//base:unit_tests", 30 | "//cpp:unit_tests", 31 | ], 32 | ) 33 | 34 | load( 35 | ":version.bzl", 36 | "VERSION", 37 | ) 38 | 39 | # Version file 40 | genrule( 41 | name = "version", 42 | srcs = [], 43 | outs = ["VERSION"], 44 | cmd = "echo '%s' > $@" % VERSION, 45 | visibility = ["//visibility:public"], 46 | ) 47 | -------------------------------------------------------------------------------- /samples/BUILD.bazel: -------------------------------------------------------------------------------- 1 | load("@io_bazel_rules_go//go:def.bzl", "go_prefix") 2 | 3 | go_prefix("github.com/bazelbuild/buildtools") 4 | 5 | test_suite( 6 | name = "tests", 7 | tests = [ 8 | "//api_proto:api.gen.pb.go_checkshtest", 9 | "//build:go_default_test", 10 | "//build:parse.y.go_checkshtest", 11 | "//build_proto:build.gen.pb.go_checkshtest", 12 | "//deps_proto:deps.gen.pb.go_checkshtest", 13 | "//edit:go_default_test", 14 | "//extra_actions_base_proto:extra_actions_base.gen.pb.go_checkshtest", 15 | "//lang:tables.gen.go_checkshtest", 16 | "//tables:go_default_test", 17 | "//wspace:go_default_test", 18 | ], 19 | ) 20 | -------------------------------------------------------------------------------- /samples/WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name = "intellij_with_bazel") 2 | 3 | # The plugin api for IntelliJ 2016.1.3. This is required to build IJwB, 4 | # and run integration tests. 5 | new_http_archive( 6 | name = "intellij_latest", 7 | build_file = "intellij_platform_sdk/BUILD.idea", 8 | url = "https://download.jetbrains.com/idea/ideaIC-2016.2.4.tar.gz", 9 | ) 10 | 11 | # The plugin api for CLion 2016.1.3. This is required to build CLwB, 12 | # and run integration tests. 13 | new_http_archive( 14 | name = "clion_latest", 15 | build_file = "intellij_platform_sdk/BUILD.clion", 16 | url = "https://download.jetbrains.com/cpp/CLion-2016.2.2.tar.gz", 17 | ) 18 | 19 | # The plugin api for Android Studio 2.2 stable. This is required to build ASwB, 20 | # and run integration tests. 21 | new_http_archive( 22 | name = "android_studio_latest", 23 | build_file = "intellij_platform_sdk/BUILD.android_studio", 24 | url = "https://dl.google.com/dl/android/studio/ide-zips/2.2.0.12/android-studio-ide-145.3276617-linux.zip", 25 | ) 26 | 27 | maven_jar( 28 | name = "junit", 29 | artifact = "junit:junit:4.11", 30 | sha1 = "4e031bb61df09069aeb2bffb4019e7a5034a4ee0", 31 | ) 32 | -------------------------------------------------------------------------------- /snippets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devoncarew/bazel-code/835b0c7a7f6e03a39ef29da739e9b728d0f64b64/snippets/.DS_Store -------------------------------------------------------------------------------- /snippets/bazel.json: -------------------------------------------------------------------------------- 1 | { 2 | "Workspace": { 3 | "prefix": "workspace", 4 | "body": [ 5 | "workspace(name = \"${1:com_github_user_project}\")" 6 | ], 7 | "description": "Bazel workspace template" 8 | }, 9 | "Build Package": { 10 | "prefix": "package", 11 | "body": [ 12 | "package(default_visibility = [\"//visibility:public\"])" 13 | ], 14 | "description": "Build package visibility" 15 | }, 16 | "New HTTP Archive": { 17 | "prefix": "new_http_archive", 18 | "body": [ 19 | "# https://docs.bazel.build/versions/master/be/workspace.html#new_http_archive", 20 | "new_http_archive(", 21 | "\tname = \"${1:rule unique name}\",\t# Reference as @$1//:target-lib", 22 | "\tbuild_file = \"${2:path to bazel build file for archive}\"", 23 | "\tsha256 = \"${3:sha256 hash to verify download}\"", 24 | "\turls = [\"${4:compressed archive url}\"],", 25 | "\tstrip_prefix = \"${5:directory prefix to string from extracted files}\"", 26 | ")" 27 | ], 28 | "description": "New HTTP archive for creating bazel repository" 29 | }, 30 | "CC Binary": { 31 | "prefix": "cc_binary", 32 | "body": [ 33 | "# https://docs.bazel.build/versions/master/be/c-cpp.html#cc_binary", 34 | "cc_binary(", 35 | "\tname = \"${1:rule unique name}\",", 36 | "\tsrcs = [\"${2:source files}\"],", 37 | "\tcopts = [],", 38 | "\tdeps = [\"${3:libraries to be linked}\"],", 39 | ")" 40 | ], 41 | "description": "c/c++ binary target" 42 | }, 43 | "CC Library": { 44 | "prefix": "cc_library", 45 | "body": [ 46 | "# https://docs.bazel.build/versions/master/be/c-cpp.html#cc_library", 47 | "cc_library(", 48 | "\tname = \"${1:rule unique name}\",", 49 | "\tsrcs = [\"${2:source files}\"],", 50 | "\thdrs = [\"${3:header files}\"],", 51 | "\tdeps = [\"${4:libraries to be linked}\"],", 52 | ")" 53 | ], 54 | "description": "c/c++ library target" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /syntax/MagicPython.license: -------------------------------------------------------------------------------- 1 | https://github.com/MagicStack/MagicPython 2 | 3 | The MIT License 4 | 5 | Copyright (c) 2015 MagicStack Inc. http://magic.io 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /syntax/MagicPython.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MagicPython", 3 | "scopeName": "source.bazel", 4 | "fileTypes": [ 5 | "py", 6 | "py3", 7 | "rpy", 8 | "pyw", 9 | "cpy", 10 | "SConstruct", 11 | "Sconstruct", 12 | "sconstruct", 13 | "SConscript", 14 | "gyp", 15 | "gypi" 16 | ], 17 | "first_line_match": "^#!/.*\\bbazel[\\d\\.]*\\b", 18 | "firstLineMatch": "^#!/.*\\bbazel[\\d\\.]*\\b", 19 | "uuid": "742deb57-6e38-4192-bed6-410746efd85d", 20 | "patterns": [ 21 | { 22 | "include": "#statement" 23 | }, 24 | { 25 | "include": "#expression" 26 | } 27 | ], 28 | "repository": { 29 | "statement": { 30 | "patterns": [ 31 | { 32 | "include": "#import" 33 | }, 34 | { 35 | "include": "#class-declaration" 36 | }, 37 | { 38 | "include": "#function-declaration" 39 | }, 40 | { 41 | "include": "#statement-keyword" 42 | }, 43 | { 44 | "include": "#assignment-operator" 45 | }, 46 | { 47 | "include": "#decorator" 48 | }, 49 | { 50 | "include": "#docstring-statement" 51 | }, 52 | { 53 | "include": "#semicolon" 54 | } 55 | ] 56 | }, 57 | "semicolon": { 58 | "patterns": [ 59 | { 60 | "name": "invalid.deprecated.semicolon.bazel", 61 | "match": "\\;$" 62 | } 63 | ] 64 | }, 65 | "comments": { 66 | "patterns": [ 67 | { 68 | "name": "comment.line.number-sign.bazel", 69 | "contentName": "meta.typehint.comment.bazel", 70 | "begin": "(?x)\n (?:\n \\# \\s* (type:)\n \\s*+ (?# we want `\\s*+` which is possessive quantifier since\n we do not actually want to backtrack when matching\n whitespace here)\n (?! $ | \\#)\n )\n", 71 | "end": "(?:$|(?=\\#))", 72 | "beginCaptures": { 73 | "0": { 74 | "name": "meta.typehint.comment.bazel" 75 | }, 76 | "1": { 77 | "name": "comment.typehint.directive.notation.bazel" 78 | } 79 | }, 80 | "patterns": [ 81 | { 82 | "name": "comment.typehint.ignore.notation.bazel", 83 | "match": "(?x)\n \\G ignore\n (?= \\s* (?: $ | \\#))\n" 84 | }, 85 | { 86 | "name": "comment.typehint.type.notation.bazel", 87 | "match": "(?x)\n (?))" 92 | }, 93 | { 94 | "name": "comment.typehint.variable.notation.bazel", 95 | "match": "([[:alpha:]_]\\w*)" 96 | } 97 | ] 98 | }, 99 | { 100 | "include": "#comments-base" 101 | } 102 | ] 103 | }, 104 | "docstring-statement": { 105 | "begin": "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))", 106 | "end": "(?<=\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\")", 107 | "patterns": [ 108 | { 109 | "include": "#docstring" 110 | } 111 | ] 112 | }, 113 | "docstring": { 114 | "patterns": [ 115 | { 116 | "name": "string.quoted.docstring.multi.bazel", 117 | "begin": "(\\'\\'\\'|\\\"\\\"\\\")", 118 | "end": "(\\1)", 119 | "beginCaptures": { 120 | "1": { 121 | "name": "punctuation.definition.string.begin.bazel" 122 | } 123 | }, 124 | "endCaptures": { 125 | "1": { 126 | "name": "punctuation.definition.string.end.bazel" 127 | } 128 | }, 129 | "patterns": [ 130 | { 131 | "include": "#docstring-prompt" 132 | }, 133 | { 134 | "include": "#codetags" 135 | }, 136 | { 137 | "include": "#docstring-guts-unicode" 138 | } 139 | ] 140 | }, 141 | { 142 | "name": "string.quoted.docstring.raw.multi.bazel", 143 | "begin": "([rR])(\\'\\'\\'|\\\"\\\"\\\")", 144 | "end": "(\\2)", 145 | "beginCaptures": { 146 | "1": { 147 | "name": "storage.type.string.bazel" 148 | }, 149 | "2": { 150 | "name": "punctuation.definition.string.begin.bazel" 151 | } 152 | }, 153 | "endCaptures": { 154 | "1": { 155 | "name": "punctuation.definition.string.end.bazel" 156 | } 157 | }, 158 | "patterns": [ 159 | { 160 | "include": "#string-consume-escape" 161 | }, 162 | { 163 | "include": "#docstring-prompt" 164 | }, 165 | { 166 | "include": "#codetags" 167 | } 168 | ] 169 | }, 170 | { 171 | "name": "string.quoted.docstring.single.bazel", 172 | "begin": "(\\'|\\\")", 173 | "end": "(\\1)|((?>>|\\.\\.\\.) \\s) (?=\\s*\\S)\n )\n", 242 | "captures": { 243 | "1": { 244 | "name": "keyword.control.flow.bazel" 245 | } 246 | } 247 | }, 248 | "codetags": { 249 | "match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)", 250 | "captures": { 251 | "1": { 252 | "name": "keyword.codetag.notation.bazel" 253 | } 254 | } 255 | }, 256 | "statement-keyword": { 257 | "patterns": [ 258 | { 259 | "name": "storage.type.function.bazel", 260 | "match": "\\b((async\\s+)?\\s*def)\\b" 261 | }, 262 | { 263 | "name": "keyword.control.flow.bazel", 264 | "match": "(?x)\n \\b(?>= | //= | \\*\\*=\n | \\+= | -= | /= | @=\n | \\*= | %= | ~= | \\^= | &= | \\|=\n | =(?!=)\n" 495 | }, 496 | "operator": { 497 | "match": "(?x)\n \\b(?> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n", 498 | "captures": { 499 | "1": { 500 | "name": "keyword.operator.logical.bazel" 501 | }, 502 | "2": { 503 | "name": "keyword.control.flow.bazel" 504 | }, 505 | "3": { 506 | "name": "keyword.operator.bitwise.bazel" 507 | }, 508 | "4": { 509 | "name": "keyword.operator.arithmetic.bazel" 510 | }, 511 | "5": { 512 | "name": "keyword.operator.comparison.bazel" 513 | } 514 | } 515 | }, 516 | "literal": { 517 | "patterns": [ 518 | { 519 | "name": "constant.language.bazel", 520 | "match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b" 521 | }, 522 | { 523 | "include": "#number" 524 | } 525 | ] 526 | }, 527 | "number": { 528 | "name": "constant.numeric.bazel", 529 | "patterns": [ 530 | { 531 | "include": "#number-float" 532 | }, 533 | { 534 | "include": "#number-dec" 535 | }, 536 | { 537 | "include": "#number-hex" 538 | }, 539 | { 540 | "include": "#number-oct" 541 | }, 542 | { 543 | "include": "#number-bin" 544 | }, 545 | { 546 | "include": "#number-long" 547 | }, 548 | { 549 | "name": "invalid.illegal.name.bazel", 550 | "match": "\\b[0-9]+\\w+" 551 | } 552 | ] 553 | }, 554 | "number-float": { 555 | "name": "constant.numeric.float.bazel", 556 | "match": "(?x)\n (?=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n", 858 | "captures": { 859 | "2": { 860 | "name": "storage.type.format.bazel" 861 | }, 862 | "3": { 863 | "name": "support.other.format.bazel" 864 | } 865 | } 866 | }, 867 | { 868 | "name": "constant.character.format.placeholder.other.bazel", 869 | "begin": "(?x)\n \\{\n \\w*? (\\.[[:alpha:]_]\\w*? | \\[[^\\]'\"]+\\])*?\n (![rsa])?\n (:)\n (?=[^'\"}\\n]*\\})\n", 870 | "end": "\\}", 871 | "beginCaptures": { 872 | "2": { 873 | "name": "storage.type.format.bazel" 874 | }, 875 | "3": { 876 | "name": "support.other.format.bazel" 877 | } 878 | }, 879 | "patterns": [ 880 | { 881 | "match": "(?x) \\{ [^'\"}\\n]*? \\} (?=.*?\\})\n" 882 | } 883 | ] 884 | } 885 | ] 886 | }, 887 | "import": { 888 | "comment": "Import statements\n", 889 | "patterns": [ 890 | { 891 | "match": "(?x)\n \\s* \\b(from)\\b (\\s*\\.+\\s*) (import)?\n", 892 | "captures": { 893 | "1": { 894 | "name": "keyword.control.import.bazel" 895 | }, 896 | "3": { 897 | "name": "keyword.control.import.bazel" 898 | } 899 | } 900 | }, 901 | { 902 | "name": "keyword.control.import.bazel", 903 | "match": "\\b(?)", 1289 | "end": "(?=:)", 1290 | "beginCaptures": { 1291 | "1": { 1292 | "name": "punctuation.separator.annotation.result.bazel" 1293 | } 1294 | }, 1295 | "patterns": [ 1296 | { 1297 | "include": "#expression" 1298 | } 1299 | ] 1300 | }, 1301 | "item-access": { 1302 | "patterns": [ 1303 | { 1304 | "name": "meta.item-access.bazel", 1305 | "begin": "(?x)\n \\b(?=\n [[:alpha:]_]\\w* \\s* \\[\n )\n", 1306 | "end": "(\\])", 1307 | "endCaptures": { 1308 | "1": { 1309 | "name": "punctuation.definition.arguments.end.bazel" 1310 | } 1311 | }, 1312 | "patterns": [ 1313 | { 1314 | "include": "#item-name" 1315 | }, 1316 | { 1317 | "include": "#item-index" 1318 | }, 1319 | { 1320 | "include": "#expression" 1321 | } 1322 | ] 1323 | } 1324 | ] 1325 | }, 1326 | "item-name": { 1327 | "patterns": [ 1328 | { 1329 | "include": "#special-variables" 1330 | }, 1331 | { 1332 | "include": "#builtin-functions" 1333 | }, 1334 | { 1335 | "include": "#special-names" 1336 | }, 1337 | { 1338 | "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" 1339 | } 1340 | ] 1341 | }, 1342 | "item-index": { 1343 | "begin": "(\\[)", 1344 | "end": "(?=\\])", 1345 | "beginCaptures": { 1346 | "1": { 1347 | "name": "punctuation.definition.arguments.begin.bazel" 1348 | } 1349 | }, 1350 | "contentName": "meta.item-access.arguments.bazel", 1351 | "patterns": [ 1352 | { 1353 | "include": "#expression" 1354 | } 1355 | ] 1356 | }, 1357 | "decorator": { 1358 | "name": "meta.function.decorator.bazel", 1359 | "begin": "(?x)\n ^\\s*\n (@) \\s* (?=[[:alpha:]_]\\w*)\n", 1360 | "end": "(?x)\n ( \\) ) (?: (?=\\s*\\#|$) | (.*$) )\n | (?=\\n|\\#)\n", 1361 | "beginCaptures": { 1362 | "1": { 1363 | "name": "entity.name.function.decorator.bazel" 1364 | } 1365 | }, 1366 | "endCaptures": { 1367 | "1": { 1368 | "name": "punctuation.definition.arguments.end.bazel" 1369 | }, 1370 | "2": { 1371 | "name": "invalid.illegal.decorator.bazel" 1372 | } 1373 | }, 1374 | "patterns": [ 1375 | { 1376 | "include": "#decorator-name" 1377 | }, 1378 | { 1379 | "include": "#function-arguments" 1380 | } 1381 | ] 1382 | }, 1383 | "decorator-name": { 1384 | "patterns": [ 1385 | { 1386 | "include": "#builtin-callables" 1387 | }, 1388 | { 1389 | "include": "#illegal-object-name" 1390 | }, 1391 | { 1392 | "name": "entity.name.function.decorator.bazel", 1393 | "match": "(?x)\n ([[:alpha:]_]\\w*) | \\.\n" 1394 | }, 1395 | { 1396 | "include": "#line-continuation" 1397 | }, 1398 | { 1399 | "name": "invalid.illegal.decorator.bazel", 1400 | "match": "(?x)\n \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n", 1401 | "captures": { 1402 | "1": { 1403 | "name": "invalid.illegal.decorator.bazel" 1404 | } 1405 | } 1406 | } 1407 | ] 1408 | }, 1409 | "call-wrapper-inheritance": { 1410 | "comment": "same as a funciton call, but in inheritance context", 1411 | "name": "meta.function-call.bazel", 1412 | "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", 1413 | "end": "(\\))", 1414 | "endCaptures": { 1415 | "1": { 1416 | "name": "punctuation.definition.arguments.end.bazel" 1417 | } 1418 | }, 1419 | "patterns": [ 1420 | { 1421 | "include": "#inheritance-name" 1422 | }, 1423 | { 1424 | "include": "#function-arguments" 1425 | } 1426 | ] 1427 | }, 1428 | "inheritance-name": { 1429 | "patterns": [ 1430 | { 1431 | "include": "#lambda-incomplete" 1432 | }, 1433 | { 1434 | "include": "#builtin-possible-callables" 1435 | }, 1436 | { 1437 | "include": "#inheritance-identifier" 1438 | } 1439 | ] 1440 | }, 1441 | "function-call": { 1442 | "name": "meta.function-call.bazel", 1443 | "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n", 1444 | "end": "(\\))", 1445 | "endCaptures": { 1446 | "1": { 1447 | "name": "punctuation.definition.arguments.end.bazel" 1448 | } 1449 | }, 1450 | "patterns": [ 1451 | { 1452 | "include": "#special-variables" 1453 | }, 1454 | { 1455 | "include": "#function-name" 1456 | }, 1457 | { 1458 | "include": "#function-arguments" 1459 | } 1460 | ] 1461 | }, 1462 | "function-name": { 1463 | "patterns": [ 1464 | { 1465 | "include": "#builtin-possible-callables" 1466 | }, 1467 | { 1468 | "comment": "Some color schemas support meta.function-call.generic scope", 1469 | "name": "meta.function-call.generic.bazel", 1470 | "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n" 1471 | } 1472 | ] 1473 | }, 1474 | "function-arguments": { 1475 | "begin": "(?x)\n (?:\n (\\()\n (?:\\s*(\\*\\*|\\*))?\n )\n", 1476 | "end": "(?=\\))(?!\\)\\s*\\()", 1477 | "beginCaptures": { 1478 | "1": { 1479 | "name": "punctuation.definition.arguments.begin.bazel" 1480 | }, 1481 | "2": { 1482 | "name": "keyword.operator.unpacking.arguments.bazel" 1483 | } 1484 | }, 1485 | "contentName": "meta.function-call.arguments.bazel", 1486 | "patterns": [ 1487 | { 1488 | "match": "(?x)\n (?:\n (,)\n (?:\\s*(\\*\\*|\\*))?\n )\n", 1489 | "captures": { 1490 | "1": { 1491 | "name": "punctuation.separator.arguments.bazel" 1492 | }, 1493 | "2": { 1494 | "name": "keyword.operator.unpacking.arguments.bazel" 1495 | } 1496 | } 1497 | }, 1498 | { 1499 | "include": "#lambda-incomplete" 1500 | }, 1501 | { 1502 | "include": "#illegal-names" 1503 | }, 1504 | { 1505 | "match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)", 1506 | "captures": { 1507 | "1": { 1508 | "name": "variable.parameter.function-call.bazel" 1509 | }, 1510 | "2": { 1511 | "name": "keyword.operator.assignment.bazel" 1512 | } 1513 | } 1514 | }, 1515 | { 1516 | "name": "keyword.operator.assignment.bazel", 1517 | "match": "=(?!=)" 1518 | }, 1519 | { 1520 | "include": "#expression" 1521 | }, 1522 | { 1523 | "match": "\\s*(\\))\\s*(\\()", 1524 | "captures": { 1525 | "1": { 1526 | "name": "punctuation.definition.arguments.end.bazel" 1527 | }, 1528 | "2": { 1529 | "name": "punctuation.definition.arguments.begin.bazel" 1530 | } 1531 | } 1532 | } 1533 | ] 1534 | }, 1535 | "builtin-callables": { 1536 | "patterns": [ 1537 | { 1538 | "include": "#illegal-names" 1539 | }, 1540 | { 1541 | "include": "#illegal-object-name" 1542 | }, 1543 | { 1544 | "include": "#builtin-exceptions" 1545 | }, 1546 | { 1547 | "include": "#builtin-functions" 1548 | }, 1549 | { 1550 | "include": "#builtin-types" 1551 | } 1552 | ] 1553 | }, 1554 | "builtin-possible-callables": { 1555 | "patterns": [ 1556 | { 1557 | "include": "#builtin-callables" 1558 | }, 1559 | { 1560 | "include": "#magic-names" 1561 | } 1562 | ] 1563 | }, 1564 | "builtin-exceptions": { 1565 | "name": "support.type.exception.bazel", 1566 | "match": "(?x) (?" 1666 | }, 1667 | "regexp-base-expression": { 1668 | "patterns": [ 1669 | { 1670 | "name": "support.other.match.any.regexp", 1671 | "match": "\\." 1672 | }, 1673 | { 1674 | "name": "support.other.match.begin.regexp", 1675 | "match": "\\^" 1676 | }, 1677 | { 1678 | "name": "support.other.match.end.regexp", 1679 | "match": "\\$" 1680 | }, 1681 | { 1682 | "name": "keyword.operator.quantifier.regexp", 1683 | "match": "[+*?]\\??" 1684 | }, 1685 | { 1686 | "name": "keyword.operator.disjunction.regexp", 1687 | "match": "\\|" 1688 | }, 1689 | { 1690 | "name": "keyword.operator.quantifier.regexp", 1691 | "match": "(?x)\n \\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\n" 1692 | }, 1693 | { 1694 | "include": "#regexp-escape-sequence" 1695 | } 1696 | ] 1697 | }, 1698 | "regexp-backreference-number": { 1699 | "name": "meta.backreference.regexp", 1700 | "match": "(\\\\[1-9]\\d?)", 1701 | "captures": { 1702 | "1": { 1703 | "name": "entity.name.tag.backreference.regexp" 1704 | } 1705 | } 1706 | }, 1707 | "regexp-backreference": { 1708 | "name": "meta.backreference.named.regexp", 1709 | "match": "(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n", 1710 | "captures": { 1711 | "1": { 1712 | "name": "punctuation.parenthesis.backreference.named.begin.regexp support.other.parenthesis.regexp" 1713 | }, 1714 | "2": { 1715 | "name": "entity.name.tag.named.backreference.regexp" 1716 | }, 1717 | "3": { 1718 | "name": "punctuation.parenthesis.backreference.named.end.regexp support.other.parenthesis.regexp" 1719 | } 1720 | } 1721 | }, 1722 | "regexp-flags": { 1723 | "name": "storage.modifier.flag.regexp", 1724 | "match": "\\(\\?[aiLmsux]+\\)" 1725 | }, 1726 | "regexp-escape-special": { 1727 | "name": "support.other.escape.special.regexp", 1728 | "match": "\\\\([AbBdDsSwWZ])" 1729 | }, 1730 | "regexp-escape-character": { 1731 | "name": "constant.character.escape.regexp", 1732 | "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | 0[0-7]{1,2}\n | [0-7]{3}\n )\n" 1733 | }, 1734 | "regexp-escape-unicode": { 1735 | "name": "constant.character.unicode.regexp", 1736 | "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n )\n" 1737 | }, 1738 | "regexp-escape-catchall": { 1739 | "name": "constant.character.escape.regexp", 1740 | "match": "\\\\(.|\\n)" 1741 | }, 1742 | "regexp-escape-sequence": { 1743 | "patterns": [ 1744 | { 1745 | "include": "#regexp-escape-special" 1746 | }, 1747 | { 1748 | "include": "#regexp-escape-character" 1749 | }, 1750 | { 1751 | "include": "#regexp-escape-unicode" 1752 | }, 1753 | { 1754 | "include": "#regexp-backreference-number" 1755 | }, 1756 | { 1757 | "include": "#regexp-escape-catchall" 1758 | } 1759 | ] 1760 | }, 1761 | "regexp-charecter-set-escapes": { 1762 | "patterns": [ 1763 | { 1764 | "name": "constant.character.escape.regexp", 1765 | "match": "\\\\[abfnrtv\\\\]" 1766 | }, 1767 | { 1768 | "include": "#regexp-escape-special" 1769 | }, 1770 | { 1771 | "name": "constant.character.escape.regexp", 1772 | "match": "\\\\([0-7]{1,3})" 1773 | }, 1774 | { 1775 | "include": "#regexp-escape-character" 1776 | }, 1777 | { 1778 | "include": "#regexp-escape-unicode" 1779 | }, 1780 | { 1781 | "include": "#regexp-escape-catchall" 1782 | } 1783 | ] 1784 | }, 1785 | "comments-base": { 1786 | "name": "comment.line.number-sign.bazel", 1787 | "begin": "(\\#)", 1788 | "beginCaptures": { 1789 | "1": { 1790 | "name": "punctuation.definition.comment.bazel" 1791 | } 1792 | }, 1793 | "end": "($)", 1794 | "patterns": [ 1795 | { 1796 | "include": "#codetags" 1797 | } 1798 | ] 1799 | }, 1800 | "comments-string-single-three": { 1801 | "name": "comment.line.number-sign.bazel", 1802 | "begin": "(\\#)", 1803 | "beginCaptures": { 1804 | "1": { 1805 | "name": "punctuation.definition.comment.bazel" 1806 | } 1807 | }, 1808 | "end": "($|(?='''))", 1809 | "patterns": [ 1810 | { 1811 | "include": "#codetags" 1812 | } 1813 | ] 1814 | }, 1815 | "comments-string-double-three": { 1816 | "name": "comment.line.number-sign.bazel", 1817 | "begin": "(\\#)", 1818 | "beginCaptures": { 1819 | "1": { 1820 | "name": "punctuation.definition.comment.bazel" 1821 | } 1822 | }, 1823 | "end": "($|(?=\"\"\"))", 1824 | "patterns": [ 1825 | { 1826 | "include": "#codetags" 1827 | } 1828 | ] 1829 | }, 1830 | "single-one-regexp-expression": { 1831 | "patterns": [ 1832 | { 1833 | "include": "#regexp-base-expression" 1834 | }, 1835 | { 1836 | "include": "#single-one-regexp-character-set" 1837 | }, 1838 | { 1839 | "include": "#single-one-regexp-comments" 1840 | }, 1841 | { 1842 | "include": "#regexp-flags" 1843 | }, 1844 | { 1845 | "include": "#single-one-regexp-named-group" 1846 | }, 1847 | { 1848 | "include": "#regexp-backreference" 1849 | }, 1850 | { 1851 | "include": "#single-one-regexp-lookahead" 1852 | }, 1853 | { 1854 | "include": "#single-one-regexp-lookahead-negative" 1855 | }, 1856 | { 1857 | "include": "#single-one-regexp-lookbehind" 1858 | }, 1859 | { 1860 | "include": "#single-one-regexp-lookbehind-negative" 1861 | }, 1862 | { 1863 | "include": "#single-one-regexp-conditional" 1864 | }, 1865 | { 1866 | "include": "#single-one-regexp-parentheses-non-capturing" 1867 | }, 1868 | { 1869 | "include": "#single-one-regexp-parentheses" 1870 | } 1871 | ] 1872 | }, 1873 | "single-one-regexp-character-set": { 1874 | "patterns": [ 1875 | { 1876 | "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n" 1877 | }, 1878 | { 1879 | "name": "meta.character.set.regexp", 1880 | "begin": "(\\[)(\\^)?(\\])?", 1881 | "end": "(\\]|(?=\\'))|((?=(?)\n", 1916 | "end": "(\\)|(?=\\'))|((?=(?)\n", 2220 | "end": "(\\)|(?=\\'\\'\\'))", 2221 | "beginCaptures": { 2222 | "1": { 2223 | "name": "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp" 2224 | }, 2225 | "2": { 2226 | "name": "entity.name.tag.named.group.regexp" 2227 | } 2228 | }, 2229 | "endCaptures": { 2230 | "1": { 2231 | "name": "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp" 2232 | }, 2233 | "2": { 2234 | "name": "invalid.illegal.newline.bazel" 2235 | } 2236 | }, 2237 | "patterns": [ 2238 | { 2239 | "include": "#single-three-regexp-expression" 2240 | }, 2241 | { 2242 | "include": "#comments-string-single-three" 2243 | } 2244 | ] 2245 | }, 2246 | "single-three-regexp-comments": { 2247 | "name": "comment.regexp", 2248 | "begin": "\\(\\?#", 2249 | "end": "(\\)|(?=\\'\\'\\'))", 2250 | "beginCaptures": { 2251 | "0": { 2252 | "name": "punctuation.comment.begin.regexp" 2253 | } 2254 | }, 2255 | "endCaptures": { 2256 | "1": { 2257 | "name": "punctuation.comment.end.regexp" 2258 | }, 2259 | "2": { 2260 | "name": "invalid.illegal.newline.bazel" 2261 | } 2262 | }, 2263 | "patterns": [ 2264 | { 2265 | "include": "#codetags" 2266 | } 2267 | ] 2268 | }, 2269 | "single-three-regexp-lookahead": { 2270 | "begin": "(\\()\\?=", 2271 | "end": "(\\)|(?=\\'\\'\\'))", 2272 | "beginCaptures": { 2273 | "0": { 2274 | "name": "keyword.operator.lookahead.regexp" 2275 | }, 2276 | "1": { 2277 | "name": "punctuation.parenthesis.lookahead.begin.regexp" 2278 | } 2279 | }, 2280 | "endCaptures": { 2281 | "1": { 2282 | "name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp" 2283 | }, 2284 | "2": { 2285 | "name": "invalid.illegal.newline.bazel" 2286 | } 2287 | }, 2288 | "patterns": [ 2289 | { 2290 | "include": "#single-three-regexp-expression" 2291 | }, 2292 | { 2293 | "include": "#comments-string-single-three" 2294 | } 2295 | ] 2296 | }, 2297 | "single-three-regexp-lookahead-negative": { 2298 | "begin": "(\\()\\?!", 2299 | "end": "(\\)|(?=\\'\\'\\'))", 2300 | "beginCaptures": { 2301 | "0": { 2302 | "name": "keyword.operator.lookahead.negative.regexp" 2303 | }, 2304 | "1": { 2305 | "name": "punctuation.parenthesis.lookahead.begin.regexp" 2306 | } 2307 | }, 2308 | "endCaptures": { 2309 | "1": { 2310 | "name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp" 2311 | }, 2312 | "2": { 2313 | "name": "invalid.illegal.newline.bazel" 2314 | } 2315 | }, 2316 | "patterns": [ 2317 | { 2318 | "include": "#single-three-regexp-expression" 2319 | }, 2320 | { 2321 | "include": "#comments-string-single-three" 2322 | } 2323 | ] 2324 | }, 2325 | "single-three-regexp-lookbehind": { 2326 | "begin": "(\\()\\?<=", 2327 | "end": "(\\)|(?=\\'\\'\\'))", 2328 | "beginCaptures": { 2329 | "0": { 2330 | "name": "keyword.operator.lookbehind.regexp" 2331 | }, 2332 | "1": { 2333 | "name": "punctuation.parenthesis.lookbehind.begin.regexp" 2334 | } 2335 | }, 2336 | "endCaptures": { 2337 | "1": { 2338 | "name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp" 2339 | }, 2340 | "2": { 2341 | "name": "invalid.illegal.newline.bazel" 2342 | } 2343 | }, 2344 | "patterns": [ 2345 | { 2346 | "include": "#single-three-regexp-expression" 2347 | }, 2348 | { 2349 | "include": "#comments-string-single-three" 2350 | } 2351 | ] 2352 | }, 2353 | "single-three-regexp-lookbehind-negative": { 2354 | "begin": "(\\()\\?)\n", 2545 | "end": "(\\)|(?=\"))|((?=(?)\n", 2849 | "end": "(\\)|(?=\"\"\"))", 2850 | "beginCaptures": { 2851 | "1": { 2852 | "name": "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp" 2853 | }, 2854 | "2": { 2855 | "name": "entity.name.tag.named.group.regexp" 2856 | } 2857 | }, 2858 | "endCaptures": { 2859 | "1": { 2860 | "name": "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp" 2861 | }, 2862 | "2": { 2863 | "name": "invalid.illegal.newline.bazel" 2864 | } 2865 | }, 2866 | "patterns": [ 2867 | { 2868 | "include": "#double-three-regexp-expression" 2869 | }, 2870 | { 2871 | "include": "#comments-string-double-three" 2872 | } 2873 | ] 2874 | }, 2875 | "double-three-regexp-comments": { 2876 | "name": "comment.regexp", 2877 | "begin": "\\(\\?#", 2878 | "end": "(\\)|(?=\"\"\"))", 2879 | "beginCaptures": { 2880 | "0": { 2881 | "name": "punctuation.comment.begin.regexp" 2882 | } 2883 | }, 2884 | "endCaptures": { 2885 | "1": { 2886 | "name": "punctuation.comment.end.regexp" 2887 | }, 2888 | "2": { 2889 | "name": "invalid.illegal.newline.bazel" 2890 | } 2891 | }, 2892 | "patterns": [ 2893 | { 2894 | "include": "#codetags" 2895 | } 2896 | ] 2897 | }, 2898 | "double-three-regexp-lookahead": { 2899 | "begin": "(\\()\\?=", 2900 | "end": "(\\)|(?=\"\"\"))", 2901 | "beginCaptures": { 2902 | "0": { 2903 | "name": "keyword.operator.lookahead.regexp" 2904 | }, 2905 | "1": { 2906 | "name": "punctuation.parenthesis.lookahead.begin.regexp" 2907 | } 2908 | }, 2909 | "endCaptures": { 2910 | "1": { 2911 | "name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp" 2912 | }, 2913 | "2": { 2914 | "name": "invalid.illegal.newline.bazel" 2915 | } 2916 | }, 2917 | "patterns": [ 2918 | { 2919 | "include": "#double-three-regexp-expression" 2920 | }, 2921 | { 2922 | "include": "#comments-string-double-three" 2923 | } 2924 | ] 2925 | }, 2926 | "double-three-regexp-lookahead-negative": { 2927 | "begin": "(\\()\\?!", 2928 | "end": "(\\)|(?=\"\"\"))", 2929 | "beginCaptures": { 2930 | "0": { 2931 | "name": "keyword.operator.lookahead.negative.regexp" 2932 | }, 2933 | "1": { 2934 | "name": "punctuation.parenthesis.lookahead.begin.regexp" 2935 | } 2936 | }, 2937 | "endCaptures": { 2938 | "1": { 2939 | "name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp" 2940 | }, 2941 | "2": { 2942 | "name": "invalid.illegal.newline.bazel" 2943 | } 2944 | }, 2945 | "patterns": [ 2946 | { 2947 | "include": "#double-three-regexp-expression" 2948 | }, 2949 | { 2950 | "include": "#comments-string-double-three" 2951 | } 2952 | ] 2953 | }, 2954 | "double-three-regexp-lookbehind": { 2955 | "begin": "(\\()\\?<=", 2956 | "end": "(\\)|(?=\"\"\"))", 2957 | "beginCaptures": { 2958 | "0": { 2959 | "name": "keyword.operator.lookbehind.regexp" 2960 | }, 2961 | "1": { 2962 | "name": "punctuation.parenthesis.lookbehind.begin.regexp" 2963 | } 2964 | }, 2965 | "endCaptures": { 2966 | "1": { 2967 | "name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp" 2968 | }, 2969 | "2": { 2970 | "name": "invalid.illegal.newline.bazel" 2971 | } 2972 | }, 2973 | "patterns": [ 2974 | { 2975 | "include": "#double-three-regexp-expression" 2976 | }, 2977 | { 2978 | "include": "#comments-string-double-three" 2979 | } 2980 | ] 2981 | }, 2982 | "double-three-regexp-lookbehind-negative": { 2983 | "begin": "(\\()\\?)\n", 218 | "end": "(\\))", 219 | "beginCaptures": { 220 | "1": { 221 | "name": "punctuation.parenthesis.named.begin.regexp support.other.parenthesis.regexp" 222 | }, 223 | "2": { 224 | "name": "entity.name.tag.named.group.regexp" 225 | } 226 | }, 227 | "endCaptures": { 228 | "1": { 229 | "name": "punctuation.parenthesis.named.end.regexp support.other.parenthesis.regexp" 230 | }, 231 | "2": { 232 | "name": "invalid.illegal.newline.bazel" 233 | } 234 | }, 235 | "patterns": [ 236 | { 237 | "include": "#regexp-expression" 238 | } 239 | ] 240 | }, 241 | "regexp-comments": { 242 | "name": "comment.regexp", 243 | "begin": "\\(\\?#", 244 | "end": "(\\))", 245 | "beginCaptures": { 246 | "0": { 247 | "name": "punctuation.comment.begin.regexp" 248 | } 249 | }, 250 | "endCaptures": { 251 | "1": { 252 | "name": "punctuation.comment.end.regexp" 253 | }, 254 | "2": { 255 | "name": "invalid.illegal.newline.bazel" 256 | } 257 | }, 258 | "patterns": [ 259 | { 260 | "include": "#codetags" 261 | } 262 | ] 263 | }, 264 | "regexp-lookahead": { 265 | "begin": "(\\()\\?=", 266 | "end": "(\\))", 267 | "beginCaptures": { 268 | "0": { 269 | "name": "keyword.operator.lookahead.regexp" 270 | }, 271 | "1": { 272 | "name": "punctuation.parenthesis.lookahead.begin.regexp" 273 | } 274 | }, 275 | "endCaptures": { 276 | "1": { 277 | "name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.regexp" 278 | }, 279 | "2": { 280 | "name": "invalid.illegal.newline.bazel" 281 | } 282 | }, 283 | "patterns": [ 284 | { 285 | "include": "#regexp-expression" 286 | } 287 | ] 288 | }, 289 | "regexp-lookahead-negative": { 290 | "begin": "(\\()\\?!", 291 | "end": "(\\))", 292 | "beginCaptures": { 293 | "0": { 294 | "name": "keyword.operator.lookahead.negative.regexp" 295 | }, 296 | "1": { 297 | "name": "punctuation.parenthesis.lookahead.begin.regexp" 298 | } 299 | }, 300 | "endCaptures": { 301 | "1": { 302 | "name": "punctuation.parenthesis.lookahead.end.regexp keyword.operator.lookahead.negative.regexp" 303 | }, 304 | "2": { 305 | "name": "invalid.illegal.newline.bazel" 306 | } 307 | }, 308 | "patterns": [ 309 | { 310 | "include": "#regexp-expression" 311 | } 312 | ] 313 | }, 314 | "regexp-lookbehind": { 315 | "begin": "(\\()\\?<=", 316 | "end": "(\\))", 317 | "beginCaptures": { 318 | "0": { 319 | "name": "keyword.operator.lookbehind.regexp" 320 | }, 321 | "1": { 322 | "name": "punctuation.parenthesis.lookbehind.begin.regexp" 323 | } 324 | }, 325 | "endCaptures": { 326 | "1": { 327 | "name": "punctuation.parenthesis.lookbehind.end.regexp keyword.operator.lookbehind.regexp" 328 | }, 329 | "2": { 330 | "name": "invalid.illegal.newline.bazel" 331 | } 332 | }, 333 | "patterns": [ 334 | { 335 | "include": "#regexp-expression" 336 | } 337 | ] 338 | }, 339 | "regexp-lookbehind-negative": { 340 | "begin": "(\\()\\?