diff --git a/Syntaxes/JavaScript.plist b/Syntaxes/JavaScript.plist index cd5436c..e755b2d 100644 --- a/Syntaxes/JavaScript.plist +++ b/Syntaxes/JavaScript.plist @@ -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"; },