Skip to content

Commit

Permalink
fix: generator function's determination; wrong parameter highlighting (
Browse files Browse the repository at this point in the history
  • Loading branch information
mkslanc committed Apr 26, 2024
1 parent 4041489 commit ceca6f7
Show file tree
Hide file tree
Showing 7 changed files with 1,115 additions and 2,325 deletions.
19 changes: 17 additions & 2 deletions src/mode/_test/text_javascript.txt
Expand Up @@ -81,7 +81,7 @@ a = {

z>>=t<<f>>r>>>s>=0b1

foo.protoype.d = function(a, b,
foo.prototype.d = function(a, b,
c, d)
foo.d =function(a, b)
foo.d =function(a, /*****/ d"string"
Expand Down Expand Up @@ -160,4 +160,19 @@ async param => expression;
}}/>
<Component onclick={param1 => {
console.log("Test")
}}/>
}}/>

//test different generator functions use cases
function* generator() {}
function*generator() {}
Sound.play = function* play() { }
foobar: function * () { }

//func's args shouldn't be determined as arrow function
func (a,b,1,2,3, async () => {})
func(a,b,innerCall(c,d), () => {})

//async arrow function with default params
async (param1, param2, ...paramN) => {
statements
}

0 comments on commit ceca6f7

Please sign in to comment.