-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Highlighting of supposed classes and functions (#1482)
Fixes #1471. It also extends function-variable to include object properties. e.g. ```js {foo: function() {}} ```
- Loading branch information
1 parent
0f75d9d
commit c40f604
Showing
6 changed files
with
79 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Foo.prototype.bar; | ||
Bar.constructor; | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["class-name", "Foo"], | ||
["punctuation", "."], | ||
"prototype", | ||
["punctuation", "."], | ||
"bar", | ||
["punctuation", ";"], | ||
|
||
["class-name", "Bar"], | ||
["punctuation", "."], | ||
"constructor", | ||
["punctuation", ";"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for supposed function variables based on standard function invocations or modifications. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
foo.apply(thisArg, args); | ||
bar.call(...args); | ||
fooBar.bind(thisArg); | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["function", "foo"], | ||
["punctuation", "."], | ||
["function", "apply"], | ||
["punctuation", "("], | ||
"thisArg", | ||
["punctuation", ","], | ||
" args", | ||
["punctuation", ")"], | ||
["punctuation", ";"], | ||
|
||
["function", "bar"], | ||
["punctuation", "."], | ||
["function", "call"], | ||
["punctuation", "("], | ||
["operator", "..."], | ||
"args", | ||
["punctuation", ")"], | ||
["punctuation", ";"], | ||
|
||
["function", "fooBar"], | ||
["punctuation", "."], | ||
["function", "bind"], | ||
["punctuation", "("], | ||
"thisArg", | ||
["punctuation", ")"], | ||
["punctuation", ";"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for supposed function variables based on standard function invocations or modifications. |