Skip to content

Commit 066bddd

Browse files
authored
Merge pull request #265 from Microsoft/updateGrammarScript
Use build script to generate grammars
2 parents 3e0e15e + b13a404 commit 066bddd

16 files changed

+9362
-10470
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
build/node_modules
2+
build/typings/
3+
build/*.js
14
tests/generated/*
25
tests/node_modules
36
tests/typings/

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,27 @@ This repository contains TmLanguage files that are consumed by TypeScript editor
55

66
# Contributing
77

8-
The XML files are generated from the YAML files, so contributors should hand-modify the YAML files, and XML files should only be generated by the [AAAPackageDev](https://github.com/SublimeText/AAAPackageDev) plugin.
8+
The XML files are generated from the YAML files, so contributors should hand-modify the YAML files, and XML files should only be generated by running build script.
9+
10+
## Build
11+
12+
Update the XML files from within the ```build``` folder
13+
14+
``` sh
15+
cd build
16+
npm install # Installs dependencies required for building
17+
npm start # Compiles & builds the XML files
18+
```
919

1020
## Tests
1121

12-
Test are run from within the ```tests``` folder
22+
Test are run from within the ```tests``` folder and depend on build to make sure XML files are upto date
1323

1424
``` sh
15-
cd tests
25+
cd build
26+
npm install # Installs dependencies required for building
27+
28+
cd ../tests
1629
npm install # Installs dependencies required for testing
1730
npm test # Compiles & runs tests
1831
```

TypeScript.YAML-tmTheme

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# VS theme settings for TypeScript
2+
3+
---
4+
name: TypeScript
5+
uuid: ef98eb90-bf9b-11e4-bb52-0800200c9a66
6+
7+
settings:
8+
- scope: storage.modifier, storage.type, keyword.control, keyword.other.ts, keyword.generator.asterisk, punctuation.definition.template-expression
9+
settings: { vsclassificationtype: keyword }
10+
- scope: keyword.operator.new.ts, keyword.operator.delete.ts, keyword.operator.in.ts, keyword.operator.of.ts, keyword.operator.instanceof.ts, keyword.operator.typeof.ts, keyword.operator.void.ts, keyword.control.as.ts, keyword.operator.is.ts
11+
settings: { vsclassificationtype: keyword }
12+
- scope: support.type, constant.language, variable.language
13+
settings: { vsclassificationtype: keyword }
14+
15+
- scope: string, punctuation.definition.string, constant.character
16+
settings: { vsclassificationtype: string }
17+
- scope: keyword.control.anchor.regexp, keyword.other.back-reference.regexp, keyword.operator.quantifier.regexp, keyword.operator.or.regexp, keyword.operator.negation.regexp, punctuation.definition.group.regexp, punctuation.definition.group.assertion.regexp, meta.assertion.look-ahead.regexp, meta.assertion.negative-look-ahead.regexp, punctuation.definition.group.capture.regexp, punctuation.definition.character-class.regexp, constant.other.character-class.range.regexp
18+
settings: { vsclassificationtype: string }
19+
20+
- scope: constant.numeric, meta.delimiter.decimal.period.ts, constant.language.nan.ts, constant.language.infinity.ts
21+
settings: { vsclassificationtype: number }
22+
23+
- scope: keyword.operator, storage.type.function.arrow.ts
24+
settings: { vsclassificationtype: operator }
25+
26+
- scope: meta.brace.angle.ts, meta.brace.round.ts, meta.brace.square.ts, punctuation, constant.language.import-export-all.ts, meta.delimiter.object.comma.ts
27+
settings: { vsclassificationtype: punctuation }
28+
29+
- scope: comment, comment.block.ts, comment.line.double-slash.ts, punctuation.definition.comment.ts
30+
settings: { vsclassificationtype: comment }
31+
- scope: comment.block.documentation.ts, other.meta.jsdoc, other.description.jsdoc
32+
settings: { vsclassificationtype: comment }
33+
- scope: entity.name.type.instance.jsdoc, variable.other.jsdoc
34+
settings: { vsclassificationtype: identifier }
35+
- scope: storage.type.class.jsdoc
36+
settings: { vsclassificationtype: xml doc comment - name }
37+
38+
- scope: entity.name.class.ts
39+
settings: { vsclassificationtype: class name }
40+
41+
- scope: entity.name.type.module.ts
42+
settings: { vsclassificationtype: module name }
43+
44+
- scope: entity.name.type.enum.ts
45+
settings: { vsclassificationtype: enum name }
46+
47+
- scope: entity.name.function, entity.name.type, meta.template.expression.ts, variable, entity.other.inherited-class.ts
48+
settings: { vsclassificationtype: identifier }
49+
50+
- scope: constant.language.undefined.ts
51+
settings: { vsclassificationtype: identifier }
52+
53+
...

0 commit comments

Comments
 (0)