Skip to content

Commit

Permalink
Correct highlighting of Logical operators on conditionals, mixins, pa…
Browse files Browse the repository at this point in the history
…rams.
  • Loading branch information
MarioRicalde committed Jun 28, 2011
1 parent 778d35a commit a0330ab
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
31 changes: 18 additions & 13 deletions Syntaxes/SCSS.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,8 @@
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b(==|!=|&lt;=|&gt;=|&lt;|&gt;|not|or|if)\b</string>
<key>name</key>
<string>keyword.control.operator</string>
<key>include</key>
<string>#logical_operators</string>
</dict>
<dict>
<key>include</key>
Expand Down Expand Up @@ -333,7 +331,7 @@
<array>
<dict>
<key>match</key>
<string>\b(==|!=|&lt;=|&gt;=|&lt;|&gt;|from|through)\b</string>
<string>(\=\=|\!\=|\&lt;\=|\&gt;\=|\&lt;|\&gt;|from|through)</string>
<key>name</key>
<string>keyword.control.operator</string>
</dict>
Expand Down Expand Up @@ -390,10 +388,8 @@
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b(==|!=|&lt;=|&gt;=|&lt;|&gt;|not|or)\b</string>
<key>name</key>
<string>keyword.control.operator</string>
<key>include</key>
<string>#logical_operators</string>
</dict>
<dict>
<key>include</key>
Expand Down Expand Up @@ -671,6 +667,13 @@
</dict>
</array>
</dict>
<key>logical_operators</key>
<dict>
<key>match</key>
<string>(\=\=|\!\=|\&lt;\=|\&gt;\=|\&lt;|\&gt;|not|or|and)</string>
<key>name</key>
<string>keyword.control.operator</string>
</dict>
<key>mixin</key>
<dict>
<key>comment</key>
Expand Down Expand Up @@ -897,6 +900,10 @@
<key>include</key>
<string>#constant_depracated_color</string>
</dict>
<dict>
<key>include</key>
<string>#logical_operators</string>
</dict>
</array>
</dict>
<key>rules</key>
Expand Down Expand Up @@ -1328,10 +1335,8 @@
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\b(==|!=|&lt;=|&gt;=|&lt;|&gt;|not)\b</string>
<key>name</key>
<string>keyword.control.operator</string>
<key>include</key>
<string>#logical_operators</string>
</dict>
<dict>
<key>include</key>
Expand Down
23 changes: 10 additions & 13 deletions Syntaxes/source.textmate
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
{ include = '#constant_font'; },
{ include = '#constant_color'; },
{ include = '#constant_depracated_color'; },
{ include = '#logical_operators';},
);
};
property_names = {
Expand Down Expand Up @@ -463,10 +464,7 @@
1 = { name = 'keyword.control.if.scss';};
};
patterns = (
{
name = 'keyword.control.operator';
match = '\b(==|!=|<=|>=|<|>|not|or)\b';
},
{ include = '#logical_operators';},
{ include = '#variable'; },
{ include = '#property_values';},

Expand All @@ -480,10 +478,7 @@
1 = { name = 'keyword.control.else.scss';};
};
patterns = (
{
name = 'keyword.control.operator';
match = '\b(==|!=|<=|>=|<|>|not|or|if)\b';
},
{ include = '#logical_operators';},
{ include = '#variable'; },
{ include = '#property_values';},
);
Expand Down Expand Up @@ -511,7 +506,7 @@
patterns = (
{
name = 'keyword.control.operator';
match = '\b(==|!=|<=|>=|<|>|from|through)\b';
match = '(\=\=|\!\=|\<\=|\>\=|\<|\>|from|through)';
},
{ include = '#variable'; },
{ include = '#property_values';},
Expand All @@ -526,10 +521,7 @@
1 = { name = 'keyword.control.while.scss';};
};
patterns = (
{
name = 'keyword.control.operator';
match = '\b(==|!=|<=|>=|<|>|not)\b';
},
{ include = '#logical_operators';},
{ include = '#variable'; },
{ include = '#property_values';},
);
Expand Down Expand Up @@ -565,5 +557,10 @@
3 = { name = 'entity.name.function.scss'; };
};
};

logical_operators = {
name = 'keyword.control.operator';
match = '(\=\=|\!\=|\<\=|\>\=|\<|\>|not|or|and)';
};
};
}

0 comments on commit a0330ab

Please sign in to comment.