|
197 | 197 | {
|
198 | 198 | 'include': '#url'
|
199 | 199 | }
|
| 200 | + { |
| 201 | + 'include': '#layer-function' |
| 202 | + } |
200 | 203 | {
|
201 | 204 | 'begin': '\\s+'
|
202 | 205 | 'end': '(?=;)'
|
203 | 206 | 'name': 'import.inner'
|
204 | 207 | 'patterns': [
|
205 | 208 | {
|
206 |
| - 'include': '#layer-function' |
| 209 | + 'match': '(?<!layer.*)layer(?=\\s|;)' |
| 210 | + 'name': 'test.begin' |
| 211 | + } |
| 212 | + { |
| 213 | + 'match': '(?<=layer.*).*(?=;)' |
| 214 | + 'name': 'test.end' |
207 | 215 | }
|
208 | 216 | # {
|
| 217 | + # 'include': '#layer-function' |
| 218 | + # } |
| 219 | + # { |
209 | 220 | # 'include': '#supports-function'
|
210 | 221 | # }
|
211 | 222 | # {
|
|
1710 | 1721 | ]
|
1711 | 1722 | 'layer-function':
|
1712 | 1723 | 'patterns': [
|
1713 |
| - { |
1714 |
| - # Match "layer" keyword |
1715 |
| - 'match': '''(?xi) |
1716 |
| - (?<!layer.*) # Only one "layer" keyword is allowed per import |
1717 |
| - layer |
1718 |
| - (?=\\s|;) # Keyword must end with a whitespace or semicolon |
1719 |
| - ''' |
1720 |
| - 'name': 'support.constant.import.css' |
1721 |
| - } |
1722 |
| - { |
1723 |
| - # Match "layer()" function |
1724 |
| - 'begin': '''(?xi) |
1725 |
| - (?<!layer[\\s\\(].*) # Only one "layer" keyword or function is allowed per import |
1726 |
| - (layer)(\\() |
1727 |
| - ''' |
1728 |
| - 'beginCaptures': |
1729 |
| - '1': |
1730 |
| - 'name': 'support.function.layer.css' |
1731 |
| - '2': |
1732 |
| - 'name': 'punctuation.section.layer.begin.bracket.round.css' |
1733 |
| - 'end': '\\)' |
1734 |
| - 'endCaptures': |
1735 |
| - '0': |
1736 |
| - 'name': 'punctuation.section.layer.end.bracket.round.css' |
1737 |
| - 'name': 'meta.function.layer.css' |
1738 |
| - 'patterns': [ |
1739 |
| - { |
1740 |
| - 'begin': '(?<=\\(\\s*)[\\w\\-\\.]*' |
1741 |
| - 'end': '(?=\\s|\\))' |
1742 |
| - 'name': 'variable.parameter.layer.css' |
1743 |
| - } |
1744 |
| - ] |
1745 |
| - } |
| 1724 | + # { |
| 1725 | + # 'match': '.*layer(?=\\s|;)' |
| 1726 | + # 'name': 'test.begin' |
| 1727 | + # } |
| 1728 | + # { |
| 1729 | + # 'match': '.*' |
| 1730 | + # 'name': 'test.end' |
| 1731 | + # } |
| 1732 | + # { |
| 1733 | + # 'match': '.*layer(\\(|\\s|;)' |
| 1734 | + # 'name': 'test.body' |
| 1735 | + # } |
| 1736 | + |
| 1737 | + # { |
| 1738 | + # 'begin': '''(?xi) |
| 1739 | + # # \\s* |
| 1740 | + # (?: |
| 1741 | + |
| 1742 | + # \\s* |
| 1743 | + # (layer) |
| 1744 | + |
| 1745 | + # # [^(layer)] |
| 1746 | + # # (?<= \\s (layer) ) |
| 1747 | + # # layer |
| 1748 | + # # .*layer |
| 1749 | + |
| 1750 | + # # (?:\\s|^)layer |
| 1751 | + # # [(layer)\\(] |
| 1752 | + # # [^(layer)]*layer |
| 1753 | + # # [^(layer)]* |
| 1754 | + # # # | |
| 1755 | + # # (?<!\\\\)(?=$|\\n) |
| 1756 | + # # .*layer |
| 1757 | + # ) |
| 1758 | + # # (layer) |
| 1759 | + # # (?: |
| 1760 | + # # (?= \\s|; ) |
| 1761 | + # # | (\\() |
| 1762 | + # # ) |
| 1763 | + # # .*layer|(?<!\\\\)(?=$|\\n) |
| 1764 | + # # (?<!layer[\\s\\(].*) # Only one "layer" keyword or function is allowed per import |
| 1765 | + # # [^(layer)]* |
| 1766 | + # # (layer) |
| 1767 | + # # (?: |
| 1768 | + # # (?= \\s|; ) |
| 1769 | + # # | ( \\( ) |
| 1770 | + # # ) |
| 1771 | + # ''' |
| 1772 | + # 'beginCaptures': |
| 1773 | + # '0': |
| 1774 | + # 'name': 'test.begin' |
| 1775 | + # # '1': |
| 1776 | + # # 'name': 'support.function.layer.css' |
| 1777 | + # # '2': |
| 1778 | + # # 'name': 'punctuation.section.layer.begin.bracket.round.css' |
| 1779 | + # 'end': '''(?xi) |
| 1780 | + # # \\) |
| 1781 | + # # | |
| 1782 | + # (?=;) |
| 1783 | + # ''' |
| 1784 | + # 'endCaptures': |
| 1785 | + # '0': |
| 1786 | + # 'name': 'test.end' |
| 1787 | + # # 'name': 'punctuation.section.layer.end.bracket.round.css' |
| 1788 | + # 'name': 'test.body' |
| 1789 | + # # 'name': 'meta.function.layer.css' |
| 1790 | + # # 'patterns': [ |
| 1791 | + # # { |
| 1792 | + # # 'begin': '(?<=\\(\\s*)[\\w\\-\\.]*' |
| 1793 | + # # 'end': '(?=\\s|\\))' |
| 1794 | + # # 'name': 'variable.parameter.layer.css' |
| 1795 | + # # } |
| 1796 | + # # ] |
| 1797 | + # } |
| 1798 | + |
| 1799 | + |
| 1800 | + |
| 1801 | + # { |
| 1802 | + # 'begin': '''(?xi) |
| 1803 | + # .*layer|(?<!\\\\)(?=$|\\n) |
| 1804 | + # ''' |
| 1805 | + # 'end': '\\)|(?=$|\\n|;)' |
| 1806 | + # 'name': 'test.body' |
| 1807 | + # } |
| 1808 | + |
| 1809 | + |
| 1810 | + # { |
| 1811 | + # 'begin': '''(?xi) |
| 1812 | + |
| 1813 | + # (?: |
| 1814 | + # [^(layer)]* |
| 1815 | + # | (?<!\\\\)(?=$|\\n) |
| 1816 | + # ) |
| 1817 | + |
| 1818 | + # (layer) |
| 1819 | + # # (?: |
| 1820 | + # # (?= \\s|; ) |
| 1821 | + # # | (\\() |
| 1822 | + # # ) |
| 1823 | + |
| 1824 | + |
| 1825 | + |
| 1826 | + |
| 1827 | + # # .*layer|(?<!\\\\)(?=$|\\n) |
| 1828 | + # # (?<!layer[\\s\\(].*) # Only one "layer" keyword or function is allowed per import |
| 1829 | + # # [^(layer)]* |
| 1830 | + # # (layer) |
| 1831 | + # # (?: |
| 1832 | + # # (?= \\s|; ) |
| 1833 | + # # | (\\() |
| 1834 | + # # ) |
| 1835 | + # ''' |
| 1836 | + # # 'beginCaptures': |
| 1837 | + # # '1': |
| 1838 | + # # 'name': 'support.function.layer.css' |
| 1839 | + # # '2': |
| 1840 | + # # 'name': 'punctuation.section.layer.begin.bracket.round.css' |
| 1841 | + # 'end': '\\)|(?=$|\\n|;)' |
| 1842 | + # # 'endCaptures': |
| 1843 | + # # '0': |
| 1844 | + # # 'name': 'punctuation.section.layer.end.bracket.round.css' |
| 1845 | + # 'name': 'test.body' |
| 1846 | + # # 'name': 'meta.function.layer.css' |
| 1847 | + # # 'patterns': [ |
| 1848 | + # # { |
| 1849 | + # # 'begin': '(?<=\\(\\s*)[\\w\\-\\.]*' |
| 1850 | + # # 'end': '(?=\\s|\\))' |
| 1851 | + # # 'name': 'variable.parameter.layer.css' |
| 1852 | + # # } |
| 1853 | + # # ] |
| 1854 | + # } |
| 1855 | + # { |
| 1856 | + # 'match': '.*layer(\\(|\\s|;)' |
| 1857 | + # 'name': 'test.body' |
| 1858 | + # } |
| 1859 | + # { |
| 1860 | + # # Match "layer" keyword |
| 1861 | + # 'match': '''(?xi) |
| 1862 | + # (?<!layer.*) # Only one "layer" keyword is allowed per import |
| 1863 | + # layer |
| 1864 | + # (?=\\s|;) # Keyword must end with a whitespace or semicolon |
| 1865 | + # ''' |
| 1866 | + # 'name': 'support.constant.import.css' |
| 1867 | + # } |
| 1868 | + # { |
| 1869 | + # # Match "layer()" function |
| 1870 | + # 'begin': '''(?xi) |
| 1871 | + # (?<!layer[\\s\\(].*) # Only one "layer" keyword or function is allowed per import |
| 1872 | + # (layer)(\\() |
| 1873 | + # ''' |
| 1874 | + # 'beginCaptures': |
| 1875 | + # '1': |
| 1876 | + # 'name': 'support.function.layer.css' |
| 1877 | + # '2': |
| 1878 | + # 'name': 'punctuation.section.layer.begin.bracket.round.css' |
| 1879 | + # 'end': '\\)' |
| 1880 | + # 'endCaptures': |
| 1881 | + # '0': |
| 1882 | + # 'name': 'punctuation.section.layer.end.bracket.round.css' |
| 1883 | + # 'name': 'meta.function.layer.css' |
| 1884 | + # 'patterns': [ |
| 1885 | + # { |
| 1886 | + # 'begin': '(?<=\\(\\s*)[\\w\\-\\.]*' |
| 1887 | + # 'end': '(?=\\s|\\))' |
| 1888 | + # 'name': 'variable.parameter.layer.css' |
| 1889 | + # } |
| 1890 | + # ] |
| 1891 | + # } |
1746 | 1892 | ]
|
1747 | 1893 | 'media-features':
|
1748 | 1894 | 'captures':
|
|
0 commit comments