@@ -2287,6 +2287,36 @@ describe "JavaScript grammar", ->
22872287 expect(tokens[6]).toEqual value: 'variable', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
22882288 expect(tokens[8]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
22892289
2290+ {tokens} = grammar.tokenizeLine('/** @param {function(...string)} variable this is the description */')
2291+ expect(tokens[4]).toEqual value: '{function(...string)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2292+ expect(tokens[6]).toEqual value: 'variable', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
2293+ expect(tokens[8]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2294+
2295+ {tokens} = grammar.tokenizeLine('/** @param {function(string, ...number)} variable this is the description */')
2296+ expect(tokens[4]).toEqual value: '{function(string, ...number)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2297+ expect(tokens[6]).toEqual value: 'variable', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
2298+ expect(tokens[8]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2299+
2300+ {tokens} = grammar.tokenizeLine('/** @param {function(string, number, ...number)} variable this is the description */')
2301+ expect(tokens[4]).toEqual value: '{function(string, number, ...number)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2302+ expect(tokens[6]).toEqual value: 'variable', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
2303+ expect(tokens[8]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2304+
2305+ {tokens} = grammar.tokenizeLine('/** @param {function(!string)} variable this is the description */')
2306+ expect(tokens[4]).toEqual value: '{function(!string)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2307+ expect(tokens[6]).toEqual value: 'variable', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
2308+ expect(tokens[8]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2309+
2310+ {tokens} = grammar.tokenizeLine('/** @param {function(?string, !number)} variable this is the description */')
2311+ expect(tokens[4]).toEqual value: '{function(?string, !number)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2312+ expect(tokens[6]).toEqual value: 'variable', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
2313+ expect(tokens[8]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2314+
2315+ {tokens} = grammar.tokenizeLine('/** @param {function(string[], number=)} variable this is the description */')
2316+ expect(tokens[4]).toEqual value: '{function(string[], number=)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2317+ expect(tokens[6]).toEqual value: 'variable', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
2318+ expect(tokens[8]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2319+
22902320 {tokens} = grammar.tokenizeLine('/** @param {function():number} variable this is the description */')
22912321 expect(tokens[4]).toEqual value: '{function():number}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
22922322 expect(tokens[6]).toEqual value: 'variable', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'variable.other.jsdoc']
@@ -2342,6 +2372,30 @@ describe "JavaScript grammar", ->
23422372 expect(tokens[4]).toEqual value: '{function(string, number)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
23432373 expect(tokens[6]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
23442374
2375+ {tokens} = grammar.tokenizeLine('/** @return {function(...string)} this is the description */')
2376+ expect(tokens[4]).toEqual value: '{function(...string)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2377+ expect(tokens[6]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2378+
2379+ {tokens} = grammar.tokenizeLine('/** @return {function(string, ...number)} this is the description */')
2380+ expect(tokens[4]).toEqual value: '{function(string, ...number)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2381+ expect(tokens[6]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2382+
2383+ {tokens} = grammar.tokenizeLine('/** @return {function(string, number, ...number)} this is the description */')
2384+ expect(tokens[4]).toEqual value: '{function(string, number, ...number)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2385+ expect(tokens[6]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2386+
2387+ {tokens} = grammar.tokenizeLine('/** @return {function(!string)} this is the description */')
2388+ expect(tokens[4]).toEqual value: '{function(!string)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2389+ expect(tokens[6]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2390+
2391+ {tokens} = grammar.tokenizeLine('/** @return {function(?string, !number)} this is the description */')
2392+ expect(tokens[4]).toEqual value: '{function(?string, !number)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2393+ expect(tokens[6]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2394+
2395+ {tokens} = grammar.tokenizeLine('/** @return {function(string[], number=)} this is the description */')
2396+ expect(tokens[4]).toEqual value: '{function(string[], number=)}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
2397+ expect(tokens[6]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
2398+
23452399 {tokens} = grammar.tokenizeLine('/** @return {function():number} this is the description */')
23462400 expect(tokens[4]).toEqual value: '{function():number}', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'entity.name.type.instance.jsdoc']
23472401 expect(tokens[6]).toEqual value: 'this is the description ', scopes: ['source.js', 'comment.block.documentation.js', 'other.meta.jsdoc', 'other.description.jsdoc']
0 commit comments