Permalink
Browse files

Fix keywords matching.

Before this commit, `object.instanceof` highlightened `instanceof`, which is wrong.

Also, var is not a type, rather than a keyword.
  • Loading branch information...
1 parent d68ea0a commit 4afd79fc4afb0de173653d4f4ec35a3c95ca31bc @paulmillr paulmillr committed with infininight Jun 29, 2012
Showing with 10 additions and 10 deletions.
  1. +10 −10 Syntaxes/JavaScript.plist
View
@@ -585,55 +585,55 @@
</dict>
<dict>
<key>match</key>
- <string>\b(boolean|byte|char|class|double|enum|float|function|int|interface|long|short|var|void)\b</string>
+ <string>(?&lt;!\.)\b(boolean|byte|char|class|double|enum|float|function|int|interface|long|short|void)\b</string>
<key>name</key>
<string>storage.type.js</string>
</dict>
<dict>
<key>match</key>
- <string>\b(const|export|extends|final|implements|native|private|protected|public|static|synchronized|throws|transient|volatile)\b</string>
+ <string>(?&lt;!\.)\b(const|export|extends|final|implements|native|private|protected|public|static|synchronized|throws|transient|var|volatile)\b</string>
<key>name</key>
<string>storage.modifier.js</string>
</dict>
<dict>
<key>match</key>
- <string>\b(break|case|catch|continue|default|do|else|finally|for|goto|if|import|package|return|switch|throw|try|while)\b</string>
+ <string>(?&lt;!\.)\b(break|case|catch|continue|default|do|else|finally|for|goto|if|import|package|return|switch|throw|try|while)\b</string>
<key>name</key>
<string>keyword.control.js</string>
</dict>
<dict>
<key>match</key>
- <string>\b(delete|in|instanceof|new|typeof|with)\b</string>
+ <string>(?&lt;!\.)\b(delete|in|instanceof|new|typeof|with)\b</string>
<key>name</key>
<string>keyword.operator.js</string>
</dict>
<dict>
<key>match</key>
- <string>\btrue\b</string>
+ <string>(?&lt;!\.)\btrue\b</string>
<key>name</key>
<string>constant.language.boolean.true.js</string>
</dict>
<dict>
<key>match</key>
- <string>\bfalse\b</string>
+ <string>(?&lt;!\.)\bfalse\b</string>
<key>name</key>
<string>constant.language.boolean.false.js</string>
</dict>
<dict>
<key>match</key>
- <string>\bnull\b</string>
+ <string>(?&lt;!\.)\bnull\b</string>
<key>name</key>
<string>constant.language.null.js</string>
</dict>
<dict>
<key>match</key>
- <string>\b(super|this)\b</string>
+ <string>(?&lt;!\.)\b(super|this)\b</string>
<key>name</key>
<string>variable.language.js</string>
</dict>
<dict>
<key>match</key>
- <string>\b(debugger)\b</string>
+ <string>(?&lt;!\.)\b(debugger)\b</string>
<key>name</key>
<string>keyword.other.js</string>
</dict>
@@ -681,7 +681,7 @@
</dict>
<dict>
<key>match</key>
- <string>!|\$|%|&amp;|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|&lt;=|&gt;=|&lt;&lt;=|&gt;&gt;=|&gt;&gt;&gt;=|&lt;&gt;|&lt;|&gt;|!|&amp;&amp;|\|\||\?\:|\*=|(?&lt;!\()/=|%=|\+=|\-=|&amp;=|\^=|\b(in|instanceof|new|delete|typeof|void)\b</string>
+ <string>!|\$|%|&amp;|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|&lt;=|&gt;=|&lt;&lt;=|&gt;&gt;=|&gt;&gt;&gt;=|&lt;&gt;|&lt;|&gt;|!|&amp;&amp;|\|\||\?\:|\*=|(?&lt;!\()/=|%=|\+=|\-=|&amp;=|\^=</string>
<key>name</key>
<string>keyword.operator.js</string>
</dict>

0 comments on commit 4afd79f

Please sign in to comment.