|
435 | 435 | "include": "#luadoc.type" |
436 | 436 | } |
437 | 437 | ] |
| 438 | + }, |
| 439 | + { |
| 440 | + "begin": "@field", |
| 441 | + "beginCaptures": { |
| 442 | + "0": { |
| 443 | + "name": "storage.type.annotation.lua" |
| 444 | + } |
| 445 | + }, |
| 446 | + "end": "(?=\\n)", |
| 447 | + "patterns": [ |
| 448 | + { |
| 449 | + "begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 450 | + "beginCaptures": { |
| 451 | + "0": { |
| 452 | + "name": "entity.name.variable.lua" |
| 453 | + } |
| 454 | + }, |
| 455 | + "end": "(?=\\n)", |
| 456 | + "patterns": [ |
| 457 | + { |
| 458 | + "include": "#luadoc.type" |
| 459 | + } |
| 460 | + ] |
| 461 | + } |
| 462 | + ] |
| 463 | + }, |
| 464 | + { |
| 465 | + "begin": "@generic", |
| 466 | + "beginCaptures": { |
| 467 | + "0": { |
| 468 | + "name": "storage.type.annotation.lua" |
| 469 | + } |
| 470 | + }, |
| 471 | + "end": "(?=\\n)", |
| 472 | + "patterns": [ |
| 473 | + { |
| 474 | + "begin": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b", |
| 475 | + "beginCaptures": { |
| 476 | + "0": { |
| 477 | + "name": "storage.type.generic.lua" |
| 478 | + } |
| 479 | + }, |
| 480 | + "end": "(?=\\n)", |
| 481 | + "patterns": [ |
| 482 | + { |
| 483 | + "match": ":", |
| 484 | + "name": "keyword.operator.lua" |
| 485 | + }, |
| 486 | + { |
| 487 | + "include": "#luadoc.type" |
| 488 | + } |
| 489 | + ] |
| 490 | + } |
| 491 | + ] |
| 492 | + }, |
| 493 | + { |
| 494 | + "begin": "@vararg", |
| 495 | + "beginCaptures": { |
| 496 | + "0": { |
| 497 | + "name": "storage.type.annotation.lua" |
| 498 | + } |
| 499 | + }, |
| 500 | + "end": "(?=\\n)", |
| 501 | + "patterns": [ |
| 502 | + { |
| 503 | + "include": "#luadoc.type" |
| 504 | + } |
| 505 | + ] |
| 506 | + }, |
| 507 | + { |
| 508 | + "begin": "@overload", |
| 509 | + "beginCaptures": { |
| 510 | + "0": { |
| 511 | + "name": "storage.type.annotation.lua" |
| 512 | + } |
| 513 | + }, |
| 514 | + "end": "(?=\\n)", |
| 515 | + "patterns": [ |
| 516 | + { |
| 517 | + "include": "#luadoc.type" |
| 518 | + } |
| 519 | + ] |
438 | 520 | } |
439 | 521 | ] |
440 | 522 | }, |
441 | 523 | "luadoc.type": { |
442 | | - "begin": "(?=[a-zA-Z_\\.\"])", |
443 | | - "end": "(?=\\s)", |
444 | 524 | "patterns": [ |
445 | 525 | { |
446 | | - "match": "(\\b([a-zA-Z_][a-zA-Z0-9_\\.]*)\\b)[ \\t]*", |
447 | | - "name": "support.type.lua" |
448 | | - }, |
449 | | - { |
450 | | - "include": "#string" |
| 526 | + "begin": "fun", |
| 527 | + "beginCaptures": { |
| 528 | + "0": { |
| 529 | + "name": "keyword.control.lua" |
| 530 | + } |
| 531 | + }, |
| 532 | + "end": "(?=\\s)", |
| 533 | + "patterns": [ |
| 534 | + { |
| 535 | + "match": "[\\(\\),:][ \\t]*", |
| 536 | + "name": "keyword.operator.lua" |
| 537 | + }, |
| 538 | + { |
| 539 | + "match": "(\\b([a-zA-Z_][a-zA-Z0-9_\\.]*)\\b)[ \\t]*(?=:)", |
| 540 | + "name": "entity.name.variable.lua" |
| 541 | + }, |
| 542 | + { |
| 543 | + "include": "#luadoc.type" |
| 544 | + } |
| 545 | + ] |
451 | 546 | }, |
452 | 547 | { |
453 | | - "include": "#luadoc.type.resume" |
| 548 | + "begin": "(?=[a-zA-Z_\\.\"])", |
| 549 | + "end": "(?=[\\s\\),])", |
| 550 | + "patterns": [ |
| 551 | + { |
| 552 | + "match": "(\\b([a-zA-Z_][a-zA-Z0-9_\\.]*)\\b)[ \\t]*", |
| 553 | + "name": "support.type.lua" |
| 554 | + }, |
| 555 | + { |
| 556 | + "include": "#string" |
| 557 | + }, |
| 558 | + { |
| 559 | + "include": "#luadoc.type.resume" |
| 560 | + } |
| 561 | + ] |
454 | 562 | } |
455 | 563 | ] |
456 | 564 | }, |
|
461 | 569 | "name": "keyword.operator.lua" |
462 | 570 | } |
463 | 571 | }, |
464 | | - "end": "(?=\\s)", |
| 572 | + "end": "(?=[\\s\\),])", |
465 | 573 | "patterns": [ |
466 | 574 | { |
467 | 575 | "match": "(\\b([a-zA-Z_][a-zA-Z0-9_\\.]*)\\b)[ \\t]*", |
|
0 commit comments