Skip to content

Commit

Permalink
Add comments support to parameter lists
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Mar 9, 2024
1 parent 7212307 commit beb4dfb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Syntaxes/SCSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ contexts:
- match: \)
scope: punctuation.section.group.end.scss
pop: 1
- include: comments
- include: comma-delimiters
- include: scss-variadics
- include: scss-parameters
Expand Down Expand Up @@ -679,6 +680,7 @@ contexts:
- match: \)
scope: punctuation.section.group.end.scss
pop: 1
- include: comments
- include: comma-delimiters
- include: scss-variadics
- include: scss-parameters
Expand Down Expand Up @@ -752,6 +754,7 @@ contexts:
- match: \)
scope: punctuation.section.group.end.scss
pop: 1
- include: comments
- include: comma-delimiters
- include: scss-variadics
- include: scss-parameters
Expand Down
25 changes: 14 additions & 11 deletions Tests/syntax_test_scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1061,23 +1061,24 @@ nav ul {
// At-Rules: mixin arguments
// https://sass-lang.com/documentation/at-rules/mixin/#arguments
//=============================================================================
@mixin rtl($property, $ltr-value, $rtl-value) {
@mixin rtl($property, $ltr-value, /**/ $rtl-value) {
// <- meta.at-rule.mixin.scss meta.mixin.scss keyword.control.directive.mixin.scss punctuation.definition.keyword.scss
//^^^^^ meta.at-rule.mixin.scss meta.mixin.scss
// ^^^ meta.at-rule.mixin.scss meta.mixin.identifier.scss
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.at-rule.mixin.scss meta.mixin.parameters.scss meta.group.scss
// ^ meta.at-rule.mixin.scss - meta.block
// ^^ meta.at-rule.mixin.scss meta.property-list.css meta.block.css
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.at-rule.mixin.scss meta.mixin.parameters.scss meta.group.scss
// ^ meta.at-rule.mixin.scss - meta.block
// ^^ meta.at-rule.mixin.scss meta.property-list.css meta.block.css
//^^^^ keyword.control.directive.mixin.scss
// ^^^ entity.name.mixin.scss
// ^ punctuation.section.group.begin.scss
// ^^^^^^^^^ variable.parameter.scss
// ^ punctuation.separator.sequence.css
// ^^^^^^^^^^ variable.parameter.scss
// ^ punctuation.separator.sequence.css
// ^^^^^^^^^^ variable.parameter.scss
// ^ punctuation.section.group.end.scss
// ^ punctuation.section.block.begin.css
// ^^^^ comment.block.css
// ^^^^^^^^^^ variable.parameter.scss
// ^ punctuation.section.group.end.scss
// ^ punctuation.section.block.begin.css
#{$property}: $ltr-value;
// <- meta.at-rule.mixin.scss meta.property-list.css meta.block.css
//^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.at-rule.mixin.scss meta.property-list.css meta.block.css
Expand Down Expand Up @@ -1114,11 +1115,11 @@ nav ul {
}

.sidebar {
@include rtl(float, left, right);
@include rtl(float, left, /* in */ right);
//^^^^^^^^^ meta.at-rule.include.scss - meta.mixin
// ^^^ meta.at-rule.include.scss meta.mixin.scss
// ^^^^^^^^^^^^^^^^^^^^ meta.at-rule.include.scss meta.mixin.arguments.scss meta.group.scss
// ^ - meta.at-rule - meta.mixin - meta.group
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.at-rule.include.scss meta.mixin.arguments.scss meta.group.scss
// ^ - meta.at-rule - meta.mixin - meta.group
//^ punctuation.definition.keyword.scss
//^^^^^^^^ keyword.control.directive.include.scss
// ^^^ variable.other.mixin.scss
Expand All @@ -1127,7 +1128,9 @@ nav ul {
// ^ punctuation.separator.sequence.css
// ^^^^ support.constant.property-value.css
// ^ punctuation.separator.sequence.css
// ^ punctuation.section.group.end.scss
// ^^^^^^^^ comment.block.css
// ^^^^^ support.constant.property-value.css
// ^ punctuation.section.group.end.scss
}

//=============================================================================
Expand Down

0 comments on commit beb4dfb

Please sign in to comment.