| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1888,21 +1888,21 @@ | |||
| 1888 | 1888 | { | |
| 1889 | 1889 | 'captures': | |
| 1890 | 1890 | '1': | |
| 1891 | - 'name': 'punctuation.definition.comment.js' | ||
| 1891 | + 'name': 'punctuation.definition.comment.begin.js' | ||
| 1892 | 1892 | '2': | |
| 1893 | - 'name': 'punctuation.definition.comment.js' | ||
| 1893 | + 'name': 'punctuation.definition.comment.end.js' | ||
| 1894 | 1894 | 'match': '(/\\*)(\\*/)' | |
| 1895 | 1895 | 'name': 'comment.block.empty.js' | |
| 1896 | 1896 | } | |
| 1897 | 1897 | { | |
| 1898 | 1898 | 'begin': '/\\*\\*' | |
| 1899 | 1899 | 'beginCaptures': | |
| 1900 | 1900 | '0': | |
| 1901 | - 'name': 'punctuation.definition.comment.js' | ||
| 1901 | + 'name': 'punctuation.definition.comment.begin.js' | ||
| 1902 | 1902 | 'end': '\\*/' | |
| 1903 | 1903 | 'endCaptures': | |
| 1904 | 1904 | '0': | |
| 1905 | - 'name': 'punctuation.definition.comment.js' | ||
| 1905 | + 'name': 'punctuation.definition.comment.end.js' | ||
| 1906 | 1906 | 'name': 'comment.block.documentation.js' | |
| 1907 | 1907 | 'patterns': [ | |
| 1908 | 1908 | { | |
@@ -1914,11 +1914,11 @@ | |||
| 1914 | 1914 | 'begin': '/\\*' | |
| 1915 | 1915 | 'beginCaptures': | |
| 1916 | 1916 | '0': | |
| 1917 | - 'name': 'punctuation.definition.comment.js' | ||
| 1917 | + 'name': 'punctuation.definition.comment.begin.js' | ||
| 1918 | 1918 | 'end': '\\*/' | |
| 1919 | 1919 | 'endCaptures': | |
| 1920 | 1920 | '0': | |
| 1921 | - 'name': 'punctuation.definition.comment.js' | ||
| 1921 | + 'name': 'punctuation.definition.comment.end.js' | ||
| 1922 | 1922 | 'name': 'comment.block.js' | |
| 1923 | 1923 | } | |
| 1924 | 1924 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -843,14 +843,14 @@ describe "JavaScript grammar", -> | |||
| 843 | 843 | member2 | |
| 844 | 844 | } from "module-name"; | |
| 845 | 845 | ''' | |
| 846 | - expect(lines[0][2]).toEqual value: '/*', scopes: ['source.js', 'meta.import.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 846 | + expect(lines[0][2]).toEqual value: '/*', scopes: ['source.js', 'meta.import.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 847 | 847 | expect(lines[0][3]).toEqual value: ' comment ', scopes: ['source.js', 'meta.import.js', 'comment.block.js'] | |
| 848 | - expect(lines[0][4]).toEqual value: '*/', scopes: ['source.js', 'meta.import.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 848 | + expect(lines[0][4]).toEqual value: '*/', scopes: ['source.js', 'meta.import.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 849 | 849 | expect(lines[1][4]).toEqual value: '//', scopes: ['source.js', 'meta.import.js', 'comment.line.double-slash.js', 'punctuation.definition.comment.js'] | |
| 850 | 850 | expect(lines[1][5]).toEqual value: ' comment', scopes: ['source.js', 'meta.import.js', 'comment.line.double-slash.js'] | |
| 851 | - expect(lines[2][1]).toEqual value: '/*', scopes: ['source.js', 'meta.import.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 851 | + expect(lines[2][1]).toEqual value: '/*', scopes: ['source.js', 'meta.import.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 852 | 852 | expect(lines[2][2]).toEqual value: ' comment ', scopes: ['source.js', 'meta.import.js', 'comment.block.js'] | |
| 853 | - expect(lines[2][3]).toEqual value: '*/', scopes: ['source.js', 'meta.import.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 853 | + expect(lines[2][3]).toEqual value: '*/', scopes: ['source.js', 'meta.import.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 854 | 854 | ||
| 855 | 855 | # https://github.com/atom/language-javascript/issues/485 | |
| 856 | 856 | lines = grammar.tokenizeLines ''' | |
@@ -966,17 +966,17 @@ describe "JavaScript grammar", -> | |||
| 966 | 966 | ''' | |
| 967 | 967 | expect(lines[1][4]).toEqual value: '//', scopes: ['source.js', 'meta.export.js', 'comment.line.double-slash.js', 'punctuation.definition.comment.js'] | |
| 968 | 968 | expect(lines[1][5]).toEqual value: ' comment', scopes: ['source.js', 'meta.export.js', 'comment.line.double-slash.js'] | |
| 969 | - expect(lines[2][1]).toEqual value: '/*', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 969 | + expect(lines[2][1]).toEqual value: '/*', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 970 | 970 | expect(lines[2][2]).toEqual value: ' comment ', scopes: ['source.js', 'meta.export.js', 'comment.block.js'] | |
| 971 | - expect(lines[2][3]).toEqual value: '*/', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 971 | + expect(lines[2][3]).toEqual value: '*/', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 972 | 972 | ||
| 973 | 973 | {tokens} = grammar.tokenizeLine('export {member1, /* comment */ member2} /* comment */ from "module";') | |
| 974 | - expect(tokens[6]).toEqual value: '/*', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 974 | + expect(tokens[6]).toEqual value: '/*', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 975 | 975 | expect(tokens[7]).toEqual value: ' comment ', scopes: ['source.js', 'meta.export.js', 'comment.block.js'] | |
| 976 | - expect(tokens[8]).toEqual value: '*/', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 977 | - expect(tokens[13]).toEqual value: '/*', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 976 | + expect(tokens[8]).toEqual value: '*/', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 977 | + expect(tokens[13]).toEqual value: '/*', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 978 | 978 | expect(tokens[14]).toEqual value: ' comment ', scopes: ['source.js', 'meta.export.js', 'comment.block.js'] | |
| 979 | - expect(tokens[15]).toEqual value: '*/', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 979 | + expect(tokens[15]).toEqual value: '*/', scopes: ['source.js', 'meta.export.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 980 | 980 | ||
| 981 | 981 | it "tokenizes default class export", -> | |
| 982 | 982 | {tokens} = grammar.tokenizeLine('export default class {}') | |
@@ -1668,23 +1668,23 @@ describe "JavaScript grammar", -> | |||
| 1668 | 1668 | ||
| 1669 | 1669 | it "tokenizes /* */ comments", -> | |
| 1670 | 1670 | {tokens} = grammar.tokenizeLine('/**/') | |
| 1671 | - expect(tokens[0]).toEqual value: '/*', scopes: ['source.js', 'comment.block.empty.js', 'punctuation.definition.comment.js'] | ||
| 1672 | - expect(tokens[1]).toEqual value: '*/', scopes: ['source.js', 'comment.block.empty.js', 'punctuation.definition.comment.js'] | ||
| 1671 | + expect(tokens[0]).toEqual value: '/*', scopes: ['source.js', 'comment.block.empty.js', 'punctuation.definition.comment.begin.js'] | ||
| 1672 | + expect(tokens[1]).toEqual value: '*/', scopes: ['source.js', 'comment.block.empty.js', 'punctuation.definition.comment.end.js'] | ||
| 1673 | 1673 | ||
| 1674 | 1674 | {tokens} = grammar.tokenizeLine('/* foo */') | |
| 1675 | - expect(tokens[0]).toEqual value: '/*', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1675 | + expect(tokens[0]).toEqual value: '/*', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 1676 | 1676 | expect(tokens[1]).toEqual value: ' foo ', scopes: ['source.js', 'comment.block.js'] | |
| 1677 | - expect(tokens[2]).toEqual value: '*/', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1677 | + expect(tokens[2]).toEqual value: '*/', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 1678 | 1678 | ||
| 1679 | 1679 | it "tokenizes /** */ comments", -> | |
| 1680 | 1680 | {tokens} = grammar.tokenizeLine('/***/') | |
| 1681 | - expect(tokens[0]).toEqual value: '/**', scopes: ['source.js', 'comment.block.documentation.js', 'punctuation.definition.comment.js'] | ||
| 1682 | - expect(tokens[1]).toEqual value: '*/', scopes: ['source.js', 'comment.block.documentation.js', 'punctuation.definition.comment.js'] | ||
| 1681 | + expect(tokens[0]).toEqual value: '/**', scopes: ['source.js', 'comment.block.documentation.js', 'punctuation.definition.comment.begin.js'] | ||
| 1682 | + expect(tokens[1]).toEqual value: '*/', scopes: ['source.js', 'comment.block.documentation.js', 'punctuation.definition.comment.end.js'] | ||
| 1683 | 1683 | ||
| 1684 | 1684 | {tokens} = grammar.tokenizeLine('/** foo */') | |
| 1685 | - expect(tokens[0]).toEqual value: '/**', scopes: ['source.js', 'comment.block.documentation.js', 'punctuation.definition.comment.js'] | ||
| 1685 | + expect(tokens[0]).toEqual value: '/**', scopes: ['source.js', 'comment.block.documentation.js', 'punctuation.definition.comment.begin.js'] | ||
| 1686 | 1686 | expect(tokens[1]).toEqual value: ' foo ', scopes: ['source.js', 'comment.block.documentation.js'] | |
| 1687 | - expect(tokens[2]).toEqual value: '*/', scopes: ['source.js', 'comment.block.documentation.js', 'punctuation.definition.comment.js'] | ||
| 1687 | + expect(tokens[2]).toEqual value: '*/', scopes: ['source.js', 'comment.block.documentation.js', 'punctuation.definition.comment.end.js'] | ||
| 1688 | 1688 | ||
| 1689 | 1689 | it "tokenizes // comments", -> | |
| 1690 | 1690 | {tokens} = grammar.tokenizeLine('// comment') | |
@@ -1702,25 +1702,25 @@ describe "JavaScript grammar", -> | |||
| 1702 | 1702 | it "tokenizes comments inside function declarations", -> | |
| 1703 | 1703 | {tokens} = grammar.tokenizeLine('function /* */ foo() /* */ {}') | |
| 1704 | 1704 | expect(tokens[0]).toEqual value: 'function', scopes: ['source.js', 'meta.function.js', 'storage.type.function.js'] | |
| 1705 | - expect(tokens[2]).toEqual value: '/*', scopes: ['source.js', 'meta.function.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1706 | - expect(tokens[4]).toEqual value: '*/', scopes: ['source.js', 'meta.function.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1705 | + expect(tokens[2]).toEqual value: '/*', scopes: ['source.js', 'meta.function.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 1706 | + expect(tokens[4]).toEqual value: '*/', scopes: ['source.js', 'meta.function.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 1707 | 1707 | expect(tokens[6]).toEqual value: 'foo', scopes: ['source.js', 'meta.function.js', 'entity.name.function.js'] | |
| 1708 | - expect(tokens[10]).toEqual value: '/*', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1709 | - expect(tokens[12]).toEqual value: '*/', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1708 | + expect(tokens[10]).toEqual value: '/*', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 1709 | + expect(tokens[12]).toEqual value: '*/', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 1710 | 1710 | ||
| 1711 | 1711 | {tokens} = grammar.tokenizeLine('x => /* */ {}') | |
| 1712 | 1712 | expect(tokens[0]).toEqual value: 'x', scopes: ['source.js', 'meta.function.arrow.js', 'meta.parameters.js', 'variable.parameter.function.js'] | |
| 1713 | 1713 | expect(tokens[2]).toEqual value: '=>', scopes: ['source.js', 'meta.function.arrow.js', 'storage.type.function.arrow.js'] | |
| 1714 | - expect(tokens[4]).toEqual value: '/*', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1715 | - expect(tokens[6]).toEqual value: '*/', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1714 | + expect(tokens[4]).toEqual value: '/*', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 1715 | + expect(tokens[6]).toEqual value: '*/', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 1716 | 1716 | expect(tokens[8]).toEqual value: '{', scopes: ['source.js', 'punctuation.definition.function.body.begin.bracket.curly.js'] | |
| 1717 | 1717 | ||
| 1718 | 1718 | {tokens} = grammar.tokenizeLine('.foo = x => /* */ {}') | |
| 1719 | 1719 | expect(tokens[1]).toEqual value: 'foo', scopes: ['source.js', 'meta.function.arrow.js', 'entity.name.function.js'] | |
| 1720 | 1720 | expect(tokens[5]).toEqual value: 'x', scopes: ['source.js', 'meta.function.arrow.js', 'meta.parameters.js', 'variable.parameter.function.js'] | |
| 1721 | 1721 | expect(tokens[7]).toEqual value: '=>', scopes: ['source.js', 'meta.function.arrow.js', 'storage.type.function.arrow.js'] | |
| 1722 | - expect(tokens[9]).toEqual value: '/*', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1723 | - expect(tokens[11]).toEqual value: '*/', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1722 | + expect(tokens[9]).toEqual value: '/*', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 1723 | + expect(tokens[11]).toEqual value: '*/', scopes: ['source.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 1724 | 1724 | expect(tokens[13]).toEqual value: '{', scopes: ['source.js', 'punctuation.definition.function.body.begin.bracket.curly.js'] | |
| 1725 | 1725 | ||
| 1726 | 1726 | lines = grammar.tokenizeLines ''' | |
@@ -1746,9 +1746,9 @@ describe "JavaScript grammar", -> | |||
| 1746 | 1746 | ||
| 1747 | 1747 | it "tokenizes comments inside function parameters correctly", -> | |
| 1748 | 1748 | {tokens} = grammar.tokenizeLine('function test(p1 /*, p2 */) {}') | |
| 1749 | - expect(tokens[6]).toEqual value: '/*', scopes: ['source.js', 'meta.function.js', 'meta.parameters.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1749 | + expect(tokens[6]).toEqual value: '/*', scopes: ['source.js', 'meta.function.js', 'meta.parameters.js', 'comment.block.js', 'punctuation.definition.comment.begin.js'] | ||
| 1750 | 1750 | expect(tokens[7]).toEqual value: ', p2 ', scopes: ['source.js', 'meta.function.js', 'meta.parameters.js', 'comment.block.js'] | |
| 1751 | - expect(tokens[8]).toEqual value: '*/', scopes: ['source.js', 'meta.function.js', 'meta.parameters.js', 'comment.block.js', 'punctuation.definition.comment.js'] | ||
| 1751 | + expect(tokens[8]).toEqual value: '*/', scopes: ['source.js', 'meta.function.js', 'meta.parameters.js', 'comment.block.js', 'punctuation.definition.comment.end.js'] | ||
| 1752 | 1752 | ||
| 1753 | 1753 | describe "console", -> | |
| 1754 | 1754 | it "tokenizes the console keyword", -> | |
@@ -1773,8 +1773,8 @@ describe "JavaScript grammar", -> | |||
| 1773 | 1773 | ||
| 1774 | 1774 | {tokens} = grammar.tokenizeLine('console/**/.log()') | |
| 1775 | 1775 | expect(tokens[0]).toEqual value: 'console', scopes: ['source.js', 'entity.name.type.object.console.js'] | |
| 1776 | - expect(tokens[1]).toEqual value: '/*', scopes: ['source.js', 'comment.block.empty.js', 'punctuation.definition.comment.js'] | ||
| 1777 | - expect(tokens[2]).toEqual value: '*/', scopes: ['source.js', 'comment.block.empty.js', 'punctuation.definition.comment.js'] | ||
| 1776 | + expect(tokens[1]).toEqual value: '/*', scopes: ['source.js', 'comment.block.empty.js', 'punctuation.definition.comment.begin.js'] | ||
| 1777 | + expect(tokens[2]).toEqual value: '*/', scopes: ['source.js', 'comment.block.empty.js', 'punctuation.definition.comment.end.js'] | ||
| 1778 | 1778 | expect(tokens[3]).toEqual value: '.', scopes: ['source.js', 'meta.method-call.js', 'meta.delimiter.method.period.js'] | |
| 1779 | 1779 | expect(tokens[4]).toEqual value: 'log', scopes: ['source.js', 'meta.method-call.js', 'support.function.console.js'] | |
| 1780 | 1780 | expect(tokens[5]).toEqual value: '(', scopes: ['source.js', 'meta.method-call.js', 'meta.arguments.js', 'punctuation.definition.arguments.begin.bracket.round.js'] | |
| Back | FazBrowse Home | New Git URL |
0 commit comments