Skip to content

Commit d37bcb2

Browse files
alexr00Alex0007
authored andcommitted
Update rust grammar to be pulled from main branch (microsoft#194787)
Discovered through microsoft#194758
1 parent 4676c0d commit d37bcb2

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
//@ts-check
6+
7+
import * as vscodeGrammarUpdater from 'vscode-grammar-updater';
8+
9+
vscodeGrammarUpdater.update('dustypomerleau/rust-syntax', 'syntaxes/rust.tmLanguage.json', './syntaxes/rust.tmLanguage.json', undefined, 'main');

extensions/rust/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"vscode": "*"
1010
},
1111
"scripts": {
12-
"update-grammar": "node ../node_modules/vscode-grammar-updater/bin dustypomerleau/rust-syntax syntaxes/rust.tmLanguage.json ./syntaxes/rust.tmLanguage.json"
12+
"update-grammar": "node ./build/update-grammar.mjs"
1313
},
1414
"contributes": {
1515
"languages": [

extensions/rust/syntaxes/rust.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@
888888
"patterns": [
889889
{
890890
"comment": "namespace (non-type, non-function path segment)",
891-
"match": "(?<![A-Za-z0-9_])([a-z0-9_]+)((?<!super|self)::)",
891+
"match": "(?<![A-Za-z0-9_])([A-Za-z0-9_]+)((?<!super|self)::)",
892892
"captures": {
893893
"1": {
894894
"name": "entity.name.namespace.rust"

0 commit comments

Comments
 (0)