Skip to content

Commit 706de20

Browse files
committed
Merge pull request #76 from Microsoft/fixNamespaceAndModule
Changes scope for namespace/module to storage.type
2 parents 97fdfc1 + c247a59 commit 706de20

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

TypeScript.YAML-tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ repository:
487487

488488
expression-operator:
489489
name: keyword.operator.ts
490-
match: =>|\b(delete|export|import|from|in|instanceof|module|namespace|new|typeof|void|as)\b
490+
match: =>|\b(delete|export|import|from|in|instanceof|new|typeof|void|as)\b
491491

492492
arithmetic-operator:
493493
name: keyword.operator.arithmetic.ts
@@ -507,7 +507,7 @@ repository:
507507

508508
storage-keyword:
509509
name: storage.type.ts
510-
match: \b(number|boolean|string|any|var|let|function|const)\b
510+
match: \b(number|boolean|string|any|var|let|function|const|module|namespace)\b
511511

512512
paren-expression:
513513
begin: \(

TypeScript.tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@
408408
<key>expression-operator</key>
409409
<dict>
410410
<key>match</key>
411-
<string>=&gt;|\b(delete|export|import|from|in|instanceof|module|namespace|new|typeof|void|as)\b</string>
411+
<string>=&gt;|\b(delete|export|import|from|in|instanceof|new|typeof|void|as)\b</string>
412412
<key>name</key>
413413
<string>keyword.operator.ts</string>
414414
</dict>
@@ -1241,7 +1241,7 @@
12411241
<key>storage-keyword</key>
12421242
<dict>
12431243
<key>match</key>
1244-
<string>\b(number|boolean|string|any|var|let|function|const)\b</string>
1244+
<string>\b(number|boolean|string|any|var|let|function|const|module|namespace)\b</string>
12451245
<key>name</key>
12461246
<string>storage.type.ts</string>
12471247
</dict>

TypeScriptReact.YAML-tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ repository:
475475

476476
expression-operator:
477477
name: keyword.operator.tsx
478-
match: =>|\b(delete|export|import|from|in|instanceof|module|namespace|new|typeof|void|as)\b
478+
match: =>|\b(delete|export|import|from|in|instanceof|new|typeof|void|as)\b
479479

480480
arithmetic-operator:
481481
name: keyword.operator.arithmetic.tsx
@@ -495,7 +495,7 @@ repository:
495495

496496
storage-keyword:
497497
name: storage.type.tsx
498-
match: \b(number|boolean|string|any|var|let|function|const)\b
498+
match: \b(number|boolean|string|any|var|let|function|const|module|namespace)\b
499499

500500
paren-expression:
501501
begin: \(

TypeScriptReact.tmLanguage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@
376376
<key>expression-operator</key>
377377
<dict>
378378
<key>match</key>
379-
<string>=&gt;|\b(delete|export|import|from|in|instanceof|module|namespace|new|typeof|void|as)\b</string>
379+
<string>=&gt;|\b(delete|export|import|from|in|instanceof|new|typeof|void|as)\b</string>
380380
<key>name</key>
381381
<string>keyword.operator.tsx</string>
382382
</dict>
@@ -1607,7 +1607,7 @@
16071607
<key>storage-keyword</key>
16081608
<dict>
16091609
<key>match</key>
1610-
<string>\b(number|boolean|string|any|var|let|function|const)\b</string>
1610+
<string>\b(number|boolean|string|any|var|let|function|const|module|namespace)\b</string>
16111611
<key>name</key>
16121612
<string>storage.type.tsx</string>
16131613
</dict>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[1, 1]: source.ts storage.type.ts
2+
[2, 1]: source.ts storage.type.ts
3+
[3, 9]: source.ts storage.type.ts
4+
[4, 9]: source.ts storage.type.ts
5+
[5, 9]: source.ts storage.type.ts

tests/cases/namespaceAndModule.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
^namespace ts { }
2+
^module ts { }
3+
declare ^namespace ts {}
4+
declare ^module ts {}
5+
declare ^module "x" {}

0 commit comments

Comments
 (0)