I noticed that RegExp.$3 wasn't colored correct. The '3' was colored as it were a number.. in this context its an instance variable.

I added a rule to recognize instance variables.

git-svn-id: http://macromates.com/svn/Bundles/trunk/JavaScript.tmbundle@526 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
This commit is contained in:
neoneye
2005-03-22 11:13:31 +00:00
parent 7155975069
commit d7093479d0
+19 -2
View File
@@ -21,8 +21,25 @@
{ name = "keywords.js"; foregroundColor = "#CC7833"; match = "\\<(this|typeof|new|true|false|undefined|null|for|in|break|continue|while|do|function|return|if|else|case|switch|var)\\>"; },
{ name = "constants.numeric.js"; match = "\\<((0(x|X)[0-9a-fA-F]+)|([0-9]+(\\.[0-9]+)?))\\>"; foregroundColor = "#3387CC"; },
{ name = "keywords.functions.js"; match = "(\\<|\\.)([a-zA-Z_]\\w*(?=\s*\\())";
"foregroundColor[2]" = "#CC3833";
{
/*
Methods:
obj.method(arguments)
*/
name = "keywords.functions.js";
match = "(\\<|\\.)([a-zA-Z_]\\w*(?=\\s*\\())";
"foregroundColor[2]" = "#CC3833";
},
{
/*
Instance Variables:
RegExp.$3
ary.lengh
*/
name = "keywords.instance-variables.js";
match = "\\.([a-zA-Z_]\\w*|\\$\\d{1,2})(?!\\s*\\()";
"foregroundColor[1]" = "#779938";
},
{ name = "strings.single-quoted.js"; begin = "'"; end = "'"; swallow = "\\\\."; foregroundColor = "#66CC33"; },