Updates to Typescript highlighting

This commit is contained in:
Garen Torikian 2012-10-02 15:05:38 -07:00
commit 29e19fc062
2 changed files with 29 additions and 11 deletions

View file

@ -52,8 +52,8 @@ var TypeScriptHighlightRules = function() {
"start": [
// Match stuff like: module name {...}
{
"token": ["keyword.operator.ts", "text", "variable.parameter.function.ts"],
"regex": "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)\\s*"
"token": ["keyword.operator.ts", "text", "variable.parameter.function.ts", "text"],
"regex": "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)"
},
// Match stuff like: super(argument, list)
{
@ -63,7 +63,7 @@ var TypeScriptHighlightRules = function() {
// Match stuff like: function() {...}
{
"token": ["entity.name.function.ts","paren.lparen", "paren.rparen"],
"regex": "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))(?:\\s*\\{)"
"regex": "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))"
},
// Match stuff like: (function: return type)
{
@ -72,7 +72,7 @@ var TypeScriptHighlightRules = function() {
},
{
"token": ["keyword.operator.ts"],
"regex": "(?:\\b(constructor|declare|interface|as|AS)\\b)"
"regex": "(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)"
},
{
"token": ["storage.type.variable.ts"],