Skip to content

Commit cf8d61e

Browse files
committed
1 parent 72da3e4 commit cf8d61e

2 files changed

Lines changed: 167 additions & 18 deletions

File tree

extensions/scss/cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"git": {
77
"name": "atom/language-sass",
88
"repositoryUrl": "https://github.com/atom/language-sass",
9-
"commitHash": "d01d29191ab323fb3cf8bde9df0429f8e07902ff"
9+
"commitHash": "f52ab12f7f9346cc2568129d8c4419bd3d506b47"
1010
}
1111
},
1212
"license": "MIT",
1313
"description": "The file syntaxes/scss.json was derived from the Atom package https://github.com/atom/language-sass which was originally converted from the TextMate bundle https://github.com/alexsancho/SASS.tmbundle.",
14-
"version": "0.62.0"
14+
"version": "0.62.1"
1515
}
1616
],
1717
"version": 1

extensions/scss/syntaxes/scss.tmLanguage.json

Lines changed: 165 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/atom/language-sass/commit/d01d29191ab323fb3cf8bde9df0429f8e07902ff",
7+
"version": "https://github.com/atom/language-sass/commit/f52ab12f7f9346cc2568129d8c4419bd3d506b47",
88
"name": "SCSS",
99
"scopeName": "source.css.scss",
1010
"patterns": [
1111
{
1212
"include": "#variable_setting"
1313
},
14+
{
15+
"include": "#at_rule_forward"
16+
},
17+
{
18+
"include": "#at_rule_use"
19+
},
1420
{
1521
"include": "#at_rule_include"
1622
},
@@ -239,6 +245,55 @@
239245
}
240246
]
241247
},
248+
"at_rule_forward": {
249+
"begin": "\\s*((@)forward\\b)\\s*",
250+
"captures": {
251+
"1": {
252+
"name": "keyword.control.at-rule.forward.scss"
253+
},
254+
"2": {
255+
"name": "punctuation.definition.keyword.scss"
256+
}
257+
},
258+
"end": "\\s*(?=;)",
259+
"name": "meta.at-rule.forward.scss",
260+
"patterns": [
261+
{
262+
"match": "\\b(as|hide|show)\\b",
263+
"name": "keyword.control.operator"
264+
},
265+
{
266+
"match": "\\b([\\w-]+)(\\*)",
267+
"captures": {
268+
"1": {
269+
"name": "entity.other.attribute-name.module.scss"
270+
},
271+
"2": {
272+
"name": "punctuation.definition.wildcard.scss"
273+
}
274+
}
275+
},
276+
{
277+
"match": "\\b[\\w-]+\\b",
278+
"name": "entity.name.function.scss"
279+
},
280+
{
281+
"include": "#variable"
282+
},
283+
{
284+
"include": "#string_single"
285+
},
286+
{
287+
"include": "#string_double"
288+
},
289+
{
290+
"include": "#comment_line"
291+
},
292+
{
293+
"include": "#comment_block"
294+
}
295+
]
296+
},
242297
"at_rule_function": {
243298
"patterns": [
244299
{
@@ -336,12 +391,18 @@
336391
"at_rule_include": {
337392
"patterns": [
338393
{
339-
"begin": "(?<=@include)\\s+([\\w-]+)\\s*(\\()",
394+
"begin": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)\\s*(\\()",
340395
"beginCaptures": {
341396
"1": {
342-
"name": "entity.name.function.scss"
397+
"name": "variable.scss"
343398
},
344399
"2": {
400+
"name": "punctuation.access.module.scss"
401+
},
402+
"3": {
403+
"name": "entity.name.function.scss"
404+
},
405+
"4": {
345406
"name": "punctuation.definition.parameters.begin.bracket.round.scss"
346407
}
347408
},
@@ -359,12 +420,18 @@
359420
]
360421
},
361422
{
362-
"match": "(?<=@include)\\s+([\\w-]+)",
423+
"match": "(?<=@include)\\s+(?:([\\w-]+)\\s*(\\.))?([\\w-]+)",
363424
"captures": {
364425
"0": {
365426
"name": "meta.at-rule.include.scss"
366427
},
367428
"1": {
429+
"name": "variable.scss"
430+
},
431+
"2": {
432+
"name": "punctuation.access.module.scss"
433+
},
434+
"3": {
368435
"name": "entity.name.function.scss"
369436
}
370437
}
@@ -794,6 +861,64 @@
794861
}
795862
]
796863
},
864+
"at_rule_use": {
865+
"begin": "\\s*((@)use\\b)\\s*",
866+
"captures": {
867+
"1": {
868+
"name": "keyword.control.at-rule.use.scss"
869+
},
870+
"2": {
871+
"name": "punctuation.definition.keyword.scss"
872+
}
873+
},
874+
"end": "\\s*(?=;)",
875+
"name": "meta.at-rule.use.scss",
876+
"patterns": [
877+
{
878+
"match": "\\b(as|with)\\b",
879+
"name": "keyword.control.operator"
880+
},
881+
{
882+
"match": "\\b[\\w-]+\\b",
883+
"name": "variable.scss"
884+
},
885+
{
886+
"match": "\\*",
887+
"name": "variable.language.expanded-namespace.scss"
888+
},
889+
{
890+
"include": "#string_single"
891+
},
892+
{
893+
"include": "#string_double"
894+
},
895+
{
896+
"include": "#comment_line"
897+
},
898+
{
899+
"include": "#comment_block"
900+
},
901+
{
902+
"begin": "\\(",
903+
"beginCaptures": {
904+
"0": {
905+
"name": "punctuation.definition.parameters.begin.bracket.round.scss"
906+
}
907+
},
908+
"end": "\\)",
909+
"endCaptures": {
910+
"0": {
911+
"name": "punctuation.definition.parameters.end.bracket.round.scss"
912+
}
913+
},
914+
"patterns": [
915+
{
916+
"include": "#function_attributes"
917+
}
918+
]
919+
}
920+
]
921+
},
797922
"at_rule_warn": {
798923
"begin": "\\s*((@)(warn|debug|error)\\b)\\s*",
799924
"captures": {
@@ -890,12 +1015,18 @@
8901015
"name": "keyword.other.default.scss"
8911016
},
8921017
"constant_functions": {
893-
"begin": "([\\w-]+)(\\()",
1018+
"begin": "(?:([\\w-]+)(\\.))?([\\w-]+)(\\()",
8941019
"beginCaptures": {
8951020
"1": {
896-
"name": "support.function.misc.scss"
1021+
"name": "variable.scss"
8971022
},
8981023
"2": {
1024+
"name": "punctuation.access.module.scss"
1025+
},
1026+
"3": {
1027+
"name": "support.function.misc.scss"
1028+
},
1029+
"4": {
8991030
"name": "punctuation.section.function.scss"
9001031
}
9011032
},
@@ -1050,10 +1181,10 @@
10501181
"name": "variable.interpolation.scss",
10511182
"patterns": [
10521183
{
1053-
"include": "#property_values"
1184+
"include": "#variable"
10541185
},
10551186
{
1056-
"include": "#variable"
1187+
"include": "#property_values"
10571188
}
10581189
]
10591190
},
@@ -1118,10 +1249,10 @@
11181249
"include": "#map"
11191250
},
11201251
{
1121-
"include": "#property_values"
1252+
"include": "#variable"
11221253
},
11231254
{
1124-
"include": "#variable"
1255+
"include": "#property_values"
11251256
}
11261257
]
11271258
},
@@ -1326,7 +1457,7 @@
13261457
]
13271458
},
13281459
"selector_attribute": {
1329-
"match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])",
1460+
"match": "(?xi)\n(\\[)\n\\s*\n(\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+?\n)\n(?:\n \\s*([~|^$*]?=)\\s*\n (?:\n (\n (?:\n [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n )\n |\n ((\")(.*?)(\"))\n |\n ((')(.*?)('))\n )\n)?\n\\s*\n(\\])",
13301461
"name": "meta.attribute-selector.scss",
13311462
"captures": {
13321463
"1": {
@@ -1421,7 +1552,7 @@
14211552
}
14221553
},
14231554
"selector_class": {
1424-
"match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n | ; # - A semicolon\n)",
1555+
"match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n | ; # - A semicolon\n)",
14251556
"name": "entity.other.attribute-name.class.css",
14261557
"captures": {
14271558
"1": {
@@ -1449,7 +1580,7 @@
14491580
"name": "entity.name.tag.custom.scss"
14501581
},
14511582
"selector_id": {
1452-
"match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
1583+
"match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.?\\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
14531584
"name": "entity.other.attribute-name.id.css",
14541585
"captures": {
14551586
"1": {
@@ -1473,7 +1604,7 @@
14731604
}
14741605
},
14751606
"selector_placeholder": {
1476-
"match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)",
1607+
"match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\.\\$ # Possible start of interpolation module scope variable\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= ; # - End of statement\n | $ # - End of the line\n | [\\s,\\#)\\[:{>+~|] # - Another selector\n | \\.[^$] # - Class selector, negating module variable\n | /\\* # - A block comment\n)",
14771608
"name": "entity.other.attribute-name.placeholder.css",
14781609
"captures": {
14791610
"1": {
@@ -1723,8 +1854,26 @@
17231854
]
17241855
},
17251856
"variables": {
1726-
"match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
1727-
"name": "variable.scss"
1857+
"patterns": [
1858+
{
1859+
"match": "\\b([\\w-]+)(\\.)(\\$[\\w-]+)\\b",
1860+
"captures": {
1861+
"1": {
1862+
"name": "variable.scss"
1863+
},
1864+
"2": {
1865+
"name": "punctuation.access.module.scss"
1866+
},
1867+
"3": {
1868+
"name": "variable.scss"
1869+
}
1870+
}
1871+
},
1872+
{
1873+
"match": "(\\$|\\-\\-)[A-Za-z0-9_-]+\\b",
1874+
"name": "variable.scss"
1875+
}
1876+
]
17281877
}
17291878
}
17301879
}

0 commit comments

Comments
 (0)