diff --git a/Syntaxes/JavaScript.plist b/Syntaxes/JavaScript.plist
index 61471a2..1478603 100644
--- a/Syntaxes/JavaScript.plist
+++ b/Syntaxes/JavaScript.plist
@@ -19,6 +19,141 @@
JavaScript
patterns
+
+ captures
+
+ 1
+
+ name
+ support.class.js
+
+ 2
+
+ name
+ support.constant.js
+
+
+ comment
+ match stuff like: Sound.prototype = { … } when extending an object
+ match
+ ([a-zA-Z_?\.$]+\w*)\.(prototype)\s*=\s*
+ name
+ meta.class.js
+
+
+ captures
+
+ 1
+
+ name
+ support.class.js
+
+ 2
+
+ name
+ support.constant.js
+
+ 3
+
+ name
+ entity.name.function.js
+
+ 4
+
+ name
+ storage.type.function.js
+
+ 5
+
+ name
+ variable.parameter.function.js
+
+
+ comment
+ match stuff like: Sound.prototype.play = function() { … }
+ match
+ ([a-zA-Z_?\.$]+\w*)\.(prototype)\.([a-zA-Z_?\.$]+\w*)\s*=\s*(function)?\s*\((.*?)\)
+ name
+ meta.function.prototype.js
+
+
+ captures
+
+ 1
+
+ name
+ support.class.js
+
+ 2
+
+ name
+ support.constant.js
+
+ 3
+
+ name
+ entity.name.function.js
+
+
+ comment
+ match stuff like: Sound.prototype.play = myfunc
+ match
+ ([a-zA-Z_?\.\$]+\w*)\.(prototype)\.([a-zA-Z_?\.$]+\w*)\s*=\s*
+ name
+ meta.function.js
+
+
+ captures
+
+ 1
+
+ name
+ support.class.js
+
+ 2
+
+ name
+ entity.name.function.js
+
+
+ comment
+ match stuff like: Sound.play = { … }
+ match
+ ([a-zA-Z_?\.$]+\w*)?\.([a-zA-Z_?\.$]+\w*)\s*=\s*
+ name
+ meta.function.js
+
+
+ captures
+
+ 1
+
+ name
+ support.class.js
+
+ 2
+
+ name
+ entity.name.function.js
+
+ 4
+
+ name
+ storage.type.function.js
+
+ 5
+
+ name
+ variable.parameter.function.js
+
+
+ comment
+ match stuff like: Sound.play = function() { … } or play = function() { … }
+ match
+ ([a-zA-Z_?\.\$]+\w*)(\.([a-zA-Z_?\.\$]+\w*))?\s*=\s*(function)?\s*\((.*?)\)
+ name
+ meta.function.js
+
captures
@@ -38,6 +173,8 @@
variable.parameter.function.js
+ comment
+ match regular function like: function myFunc(arg) { … }
match
\b(function)\s+([a-zA-Z_$]\w*)?\s*\((.*?)\)
name
@@ -65,9 +202,9 @@
comment
match stuff like: foobar: function() { … }
match
- \b([a-zA-Z_?\.$]+\w*)\s*:\s+\b(function)?\s*\((.*?)\)
+ \b([a-zA-Z_?\.$]+\w*)\s*:\s*\b(function)?\s*\((.*?)\)
name
- meta.function.js
+ meta.function.json.js
captures
@@ -75,25 +212,61 @@
1
name
- entity.name.function.js
-
- 2
-
- name
- storage.type.function.js
+ string.quoted.js
3
+
+ name
+ object.property.function.js
+
+ 5
+
+ name
+ entity.name.function.js
+
+ 6
name
variable.parameter.function.js
comment
- match stuff like: Sound.prototype.play = function() { … }
+ Attempt to match "foo": function
match
- \b([a-zA-Z_?\.$]+\w*)\s+=\s+\b(function)?\s*\((.*?)\)
+ (('|")(.*?)(\2))\s*:\s*\b(function)?\s*\((.*?)\)
name
- meta.function.js
+ meta.function.json.js
+
+
+ captures
+
+ 1
+
+ name
+ keyword.operator.new.js
+
+ 2
+
+ name
+ entity.name.instance.js
+
+
+ match
+ (new)\s+(\w+\.?\w*)
+ name
+ meta.class.instance.constructor
+
+
+ match
+ \b(console)\b
+ name
+ entity.name.object.js.firebug
+
+
+ match
+ \.(warn|info|log|error|time|timeEnd|assert)\b
+ name
+ support.function.js.firebug
match