|
4 | 4 | "If you want to provide a fix or improvement, please create a pull request against the original repository.", |
5 | 5 | "Once accepted there, we are happy to receive an update request." |
6 | 6 | ], |
7 | | - "version": "https://github.com/atom/language-java/commit/123beb50115b0bfb0db8f2325df6d05fb8a016a8", |
| 7 | + "version": "https://github.com/atom/language-java/commit/0facf7cbe02cda460db1160fd730f2e57bf15c36", |
8 | 8 | "name": "Java", |
9 | 9 | "scopeName": "source.java", |
10 | 10 | "patterns": [ |
|
209 | 209 | "name": "keyword.control.new.java" |
210 | 210 | } |
211 | 211 | }, |
212 | | - "end": "(?=;|\\)|,|:|}|\\+|\\-|\\*|\\/|%|!|&|\\||=)", |
| 212 | + "end": "(?=;|\\)|\\]|\\.|,|\\?|:|}|\\+|\\-|\\*|\\/(?!\\/|\\*)|%|!|&|\\||\\^|=)", |
213 | 213 | "patterns": [ |
214 | 214 | { |
215 | 215 | "include": "#comments" |
|
269 | 269 | ] |
270 | 270 | }, |
271 | 271 | "class": { |
272 | | - "begin": "(?=\\w?[\\w\\s]*\\b(?:class|(?<!@)interface|enum)\\s+\\w+)", |
| 272 | + "begin": "(?=\\w?[\\w\\s]*\\b(?:class|(?<!@)interface|enum)\\s+[\\w$]+)", |
273 | 273 | "end": "}", |
274 | 274 | "endCaptures": { |
275 | 275 | "0": { |
|
296 | 296 | "name": "entity.name.type.class.java" |
297 | 297 | } |
298 | 298 | }, |
299 | | - "match": "(class|(?<!@)interface|enum)\\s+(\\w+)", |
| 299 | + "match": "(class|(?<!@)interface|enum)\\s+([\\w$]+)", |
300 | 300 | "name": "meta.class.identifier.java" |
301 | 301 | }, |
302 | 302 | { |
|
696 | 696 | "include": "#comments" |
697 | 697 | }, |
698 | 698 | { |
699 | | - "begin": "(\\w+)\\s*({)", |
| 699 | + "begin": "\\b(\\w+)\\b", |
700 | 700 | "beginCaptures": { |
701 | 701 | "1": { |
702 | 702 | "name": "constant.other.enum.java" |
703 | | - }, |
704 | | - "2": { |
705 | | - "name": "punctuation.bracket.curly.java" |
706 | 703 | } |
707 | 704 | }, |
708 | | - "end": "\\}", |
| 705 | + "end": "(,)|(?=;|})", |
709 | 706 | "endCaptures": { |
710 | | - "0": { |
711 | | - "name": "punctuation.bracket.curly.java" |
| 707 | + "1": { |
| 708 | + "name": "punctuation.separator.delimiter.java" |
712 | 709 | } |
713 | 710 | }, |
714 | 711 | "patterns": [ |
715 | 712 | { |
716 | | - "include": "#class-body" |
717 | | - } |
718 | | - ] |
719 | | - }, |
720 | | - { |
721 | | - "begin": "(\\w+)\\s*(\\()", |
722 | | - "beginCaptures": { |
723 | | - "1": { |
724 | | - "name": "constant.other.enum.java" |
| 713 | + "include": "#comments-javadoc" |
| 714 | + }, |
| 715 | + { |
| 716 | + "include": "#comments" |
| 717 | + }, |
| 718 | + { |
| 719 | + "begin": "\\(", |
| 720 | + "beginCaptures": { |
| 721 | + "0": { |
| 722 | + "name": "punctuation.bracket.round.java" |
| 723 | + } |
| 724 | + }, |
| 725 | + "end": "\\)", |
| 726 | + "endCaptures": { |
| 727 | + "0": { |
| 728 | + "name": "punctuation.bracket.round.java" |
| 729 | + } |
| 730 | + }, |
| 731 | + "patterns": [ |
| 732 | + { |
| 733 | + "include": "#code" |
| 734 | + } |
| 735 | + ] |
725 | 736 | }, |
726 | | - "2": { |
727 | | - "name": "punctuation.bracket.round.java" |
728 | | - } |
729 | | - }, |
730 | | - "end": "\\)", |
731 | | - "endCaptures": { |
732 | | - "0": { |
733 | | - "name": "punctuation.bracket.round.java" |
734 | | - } |
735 | | - }, |
736 | | - "patterns": [ |
737 | 737 | { |
738 | | - "include": "#code" |
| 738 | + "begin": "{", |
| 739 | + "beginCaptures": { |
| 740 | + "0": { |
| 741 | + "name": "punctuation.bracket.curly.java" |
| 742 | + } |
| 743 | + }, |
| 744 | + "end": "}", |
| 745 | + "endCaptures": { |
| 746 | + "0": { |
| 747 | + "name": "punctuation.bracket.curly.java" |
| 748 | + } |
| 749 | + }, |
| 750 | + "patterns": [ |
| 751 | + { |
| 752 | + "include": "#class-body" |
| 753 | + } |
| 754 | + ] |
739 | 755 | } |
740 | 756 | ] |
741 | | - }, |
742 | | - { |
743 | | - "match": "\\b\\w+\\b", |
744 | | - "name": "constant.other.enum.java" |
745 | 757 | } |
746 | 758 | ] |
747 | 759 | }, |
|
1472 | 1484 | ] |
1473 | 1485 | }, |
1474 | 1486 | { |
1475 | | - "begin": "\\b(catch)\\b\\s*(?=\\(\\s*[^\\s]+\\s*[^)]+\\))", |
| 1487 | + "begin": "\\b(catch)\\b", |
1476 | 1488 | "beginCaptures": { |
1477 | 1489 | "1": { |
1478 | 1490 | "name": "keyword.control.catch.java" |
|
1486 | 1498 | }, |
1487 | 1499 | "name": "meta.catch.java", |
1488 | 1500 | "patterns": [ |
| 1501 | + { |
| 1502 | + "include": "#comments" |
| 1503 | + }, |
1489 | 1504 | { |
1490 | 1505 | "begin": "\\(", |
1491 | 1506 | "beginCaptures": { |
|
1508 | 1523 | "include": "#storage-modifiers" |
1509 | 1524 | }, |
1510 | 1525 | { |
1511 | | - "match": "\\|", |
1512 | | - "name": "punctuation.catch.separator.java" |
1513 | | - }, |
1514 | | - { |
1515 | | - "match": "([a-zA-Z$_][\\.a-zA-Z0-9$_]*)\\s*(\\w+)?", |
1516 | | - "captures": { |
1517 | | - "1": { |
| 1526 | + "begin": "[a-zA-Z$_][\\.a-zA-Z0-9$_]*", |
| 1527 | + "beginCaptures": { |
| 1528 | + "0": { |
1518 | 1529 | "name": "storage.type.java" |
| 1530 | + } |
| 1531 | + }, |
| 1532 | + "end": "(\\|)|(?=\\))", |
| 1533 | + "endCaptures": { |
| 1534 | + "1": { |
| 1535 | + "name": "punctuation.catch.separator.java" |
| 1536 | + } |
| 1537 | + }, |
| 1538 | + "patterns": [ |
| 1539 | + { |
| 1540 | + "include": "#comments" |
1519 | 1541 | }, |
1520 | | - "2": { |
1521 | | - "name": "variable.parameter.java" |
| 1542 | + { |
| 1543 | + "match": "\\w+", |
| 1544 | + "captures": { |
| 1545 | + "0": { |
| 1546 | + "name": "variable.parameter.java" |
| 1547 | + } |
| 1548 | + } |
1522 | 1549 | } |
1523 | | - } |
| 1550 | + ] |
1524 | 1551 | } |
1525 | 1552 | ] |
1526 | 1553 | }, |
|
0 commit comments