mirror of
https://github.com/kennethreitz-archive/kJS.tmbundle.git
synced 2026-06-05 23:50:19 +00:00
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:
@@ -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"; },
|
||||
|
||||
Reference in New Issue
Block a user