Skip to content

Rewrite and fixes for lot of grammar issues #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 78 commits into from
Sep 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
89e4a66
Make baselines so we can verify against new grammar
sheetalkamat Jul 28, 2016
c0acaa2
Add original file to baselines for easier diagnosing issues with base…
sheetalkamat Jul 28, 2016
b08936f
Stop running old baselines along with making better baseline for mark…
sheetalkamat Jul 28, 2016
c0d907e
Generate baselines and markers in same folder
sheetalkamat Jul 29, 2016
d9a7c97
Theme files for existing typescript and typescript react
sheetalkamat Aug 11, 2016
aea13ef
Update comment grammar
sheetalkamat Aug 11, 2016
89d8a7b
Changes for numeric literals
sheetalkamat Aug 11, 2016
b4a9b2d
Generate the marker file only if there are any markers in the file
sheetalkamat Aug 11, 2016
9c71cac
Constants - true, false, null, undefined, nan, infinity
sheetalkamat Aug 11, 2016
1de155d
Strings
sheetalkamat Aug 11, 2016
91a4709
Regular expressions
sheetalkamat Aug 11, 2016
8c4e427
Renaming of scope names to match other grammars
sheetalkamat Aug 16, 2016
38cee99
Workaround to distiguish attribute values from the string literals
sheetalkamat Aug 16, 2016
b7a6c22
Few simplifications for type-name and primitive types
sheetalkamat Aug 17, 2016
66a6eba
Fix the method return type, handle return type that is object type an…
sheetalkamat Aug 17, 2016
543cc6a
Fix the return type of function type when it is tuple or object type
sheetalkamat Aug 17, 2016
3fff5ce
Fix the incorrect ternary operator colorizing in tsx file
sheetalkamat Aug 17, 2016
eaeaa94
Include comments in type declaration
sheetalkamat Aug 17, 2016
b0b161d
Fix incorrect scope name for assignment
sheetalkamat Aug 17, 2016
153f123
Fix the fn return type annotation when it is used inside the object type
sheetalkamat Aug 18, 2016
731f7c0
Rearrange the declarations, statements, expressions
sheetalkamat Aug 19, 2016
80ad4f0
Export var, type and enums declarations
sheetalkamat Aug 19, 2016
7ec2883
Detect { followed by => as body of the arrow function
sheetalkamat Aug 19, 2016
132088f
Await is keyword.control and not modifier
sheetalkamat Aug 19, 2016
87e32c6
Fix for loop variable declarations
sheetalkamat Aug 19, 2016
8914364
{ after the operator is object literal and not the declaration block
sheetalkamat Aug 19, 2016
d5caa74
rename meta.block to meta.object-literal
sheetalkamat Aug 19, 2016
c817285
Rename meta.decl.block to meta.block
sheetalkamat Aug 19, 2016
4774bec
Support Import equals and import declarations
sheetalkamat Aug 19, 2016
8870cb4
Support for Export declarations
sheetalkamat Aug 19, 2016
9fbaca8
Namespace declarations
sheetalkamat Aug 19, 2016
35731c0
Destructuring variable declaration
sheetalkamat Aug 19, 2016
f0633d8
Support for parameter destructuring
sheetalkamat Aug 19, 2016
c8dbfcf
Add support for method declaration as object member
sheetalkamat Aug 19, 2016
d0d1952
Support decorators
sheetalkamat Aug 25, 2016
dbcfb87
Computed property names
sheetalkamat Aug 26, 2016
b0208af
Because sublime doesnt understand patterns in the capture, re-impleme…
sheetalkamat Aug 26, 2016
a5de004
Fix the identifier pattern
sheetalkamat Aug 26, 2016
037f419
Adding test for already fixed bug
sheetalkamat Aug 26, 2016
e038ac8
Rename meta.function.type.parameter.ts to meta.parameters.ts
sheetalkamat Aug 29, 2016
4b6badf
Arrow functions
sheetalkamat Aug 30, 2016
b0e78c0
Generate the marker file only if there are any markers in the file
sheetalkamat Aug 11, 2016
d0e25ea
Tokenize only once per file
sheetalkamat Aug 30, 2016
9c1006c
Merge branch 'baselineTests' into modifyExistingGrammar
sheetalkamat Aug 30, 2016
82ac7df
Arrow function bodies and minimal return type support
sheetalkamat Aug 30, 2016
f01053f
Support generators syntax and fix the scoping of type parameter end
sheetalkamat Aug 31, 2016
6222a18
Fix how jsx tag and children are scoped
sheetalkamat Aug 31, 2016
7dcc1ee
Remove scopes meta.tag.open.tsx and meta.tag.close.tsx and use meta.t…
sheetalkamat Aug 31, 2016
5a0c10a
Add content name for meta.jsx.children.tsx
sheetalkamat Aug 31, 2016
0425a20
Theme file update for template substitution and generator
sheetalkamat Aug 31, 2016
21d57cb
Variable scope can end with block end
sheetalkamat Aug 31, 2016
0cab1cc
Fix the new expression end regex
sheetalkamat Aug 31, 2016
4e252af
Few test cases for #202, #247, #66, #88
sheetalkamat Aug 31, 2016
a883c36
Test case for #203 and #178
sheetalkamat Sep 1, 2016
0178496
Support string literal type
sheetalkamat Sep 1, 2016
191f6c2
Fix function call type parameters
sheetalkamat Sep 1, 2016
78b06c4
Optimize the TypeArguments of function call regex
sheetalkamat Sep 1, 2016
7fa318b
Make sure the identifiers are handled with . and $
sheetalkamat Sep 1, 2016
42d20a6
Fix the end of ternary expression
sheetalkamat Sep 1, 2016
170078a
Simplify arrow parameter regex so make sure it doesnt take forever
sheetalkamat Sep 6, 2016
ddb2346
Fix the for of declarations
sheetalkamat Sep 7, 2016
fecf4e3
Handle comments inside type
sheetalkamat Sep 8, 2016
c1c0c65
VS classification theme update
sheetalkamat Sep 8, 2016
cfd2afb
Fix the regex start
sheetalkamat Sep 9, 2016
5f891a8
Support readonly modifier
sheetalkamat Sep 9, 2016
bbaffdc
Support builtin type literals like this,true,false,null,undefined
sheetalkamat Sep 13, 2016
2d15a59
Some rearranging for type-predicate and typeof operator
sheetalkamat Sep 13, 2016
aa5eecd
Treat the expression after as operator as Type
sheetalkamat Sep 13, 2016
9e2430a
Dont treat start of new line as regex since it could be continuing ex…
sheetalkamat Sep 13, 2016
d1b6822
Fix the usage of \G because there is difference in how sublime uses i…
sheetalkamat Sep 13, 2016
7dbf74c
Simplify class meta scoping and use meta.class.ts instead of meta.dec…
sheetalkamat Sep 13, 2016
fed8160
new operator can end at another new operator
sheetalkamat Sep 13, 2016
1c5a0d1
Scope object literal keys
sheetalkamat Sep 13, 2016
a63a0fb
Support arrow type parameters
sheetalkamat Sep 13, 2016
87aa92a
Scope function names from function calls and add scoping for ,
sheetalkamat Sep 15, 2016
8170e06
Scope ';'
sheetalkamat Sep 15, 2016
84a4e42
Scope '.' accessor
sheetalkamat Sep 15, 2016
e6b8e96
Rename the function references from entity.name.function to variable.…
sheetalkamat Sep 16, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,243 changes: 951 additions & 292 deletions TypeScript.YAML-tmLanguage

Large diffs are not rendered by default.

3,696 changes: 2,938 additions & 758 deletions TypeScript.tmLanguage

Large diffs are not rendered by default.

176 changes: 176 additions & 0 deletions TypeScript.tmTheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TypeScript</string>
<key>settings</key>
<array>
<dict>
<key>scope</key>
<string>storage.modifier, storage.type, keyword.control, keyword.other.ts, keyword.generator.asterisk, punctuation.definition.template-expression</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>keyword</string>
</dict>
</dict>
<dict>
<key>scope</key>
<string>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</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>keyword</string>
</dict>
</dict>
<dict>
<key>scope</key>
<string>support.type, constant.language, variable.language</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>keyword</string>
</dict>
</dict>

<dict>
<key>scope</key>
<string>string, punctuation.definition.string, constant.character</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>string</string>
</dict>
</dict>
<dict>
<key>scope</key>
<string>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</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>string</string>
</dict>
</dict>

<dict>
<key>scope</key>
<string>constant.numeric, meta.delimiter.decimal.period.ts, constant.language.nan.ts, constant.language.infinity.ts</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>number</string>
</dict>
</dict>

<dict>
<key>scope</key>
<string>keyword.operator, storage.type.function.arrow.ts</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>operator</string>
</dict>
</dict>

<dict>
<key>scope</key>
<string>meta.brace.angle.ts, meta.brace.round.ts, meta.brace.square.ts, punctuation, constant.language.import-export-all.ts, meta.delimiter.object.comma.ts</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>punctuation</string>
</dict>
</dict>

<dict>
<key>scope</key>
<string>comment, comment.block.ts, comment.line.double-slash.ts, punctuation.definition.comment.ts</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>comment</string>
</dict>
</dict>
<dict>
<key>scope</key>
<string>comment.block.documentation.ts, other.meta.jsdoc, other.description.jsdoc</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>comment</string>
</dict>
</dict>
<dict>
<key>scope</key>
<string>entity.name.type.instance.jsdoc, variable.other.jsdoc</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>identifier</string>
</dict>
</dict>
<dict>
<key>scope</key>
<string>storage.type.class.jsdoc</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>xml doc comment - name</string>
</dict>
</dict>

<dict>
<key>scope</key>
<string>entity.name.class.ts</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>class name</string>
</dict>
</dict>

<dict>
<key>scope</key>
<string>entity.name.type.module.ts</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>module name</string>
</dict>
</dict>

<dict>
<key>scope</key>
<string>entity.name.type.enum.ts</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>enum name</string>
</dict>
</dict>

<dict>
<key>scope</key>
<string>entity.name.function, entity.name.type, meta.template.expression.ts, variable, entity.other.inherited-class.ts</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>identifier</string>
</dict>
</dict>
<dict>
<key>scope</key>
<string>constant.language.undefined.ts</string>
<key>settings</key>
<dict>
<key>vsclassificationtype</key>
<string>identifier</string>
</dict>
</dict>

</array>
<key>uuid</key>
<string>ef98eb90-bf9b-11e4-bb52-0800200c9a66</string>
</dict>
</plist>
Loading