Skip to content

Commit 37571bb

Browse files
committed
syntax highlight "is" and "is not" operators
1 parent 02382ed commit 37571bb

4 files changed

+12
-6
lines changed

syntaxes/cfscript-in-tags.sublime-syntax

+2-2
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,9 @@ contexts:
536536
=== | # equality left-to-right both
537537
!== | # equality left-to-right both
538538
== | # equality left-to-right both
539-
\b(?i:eq)\b |
539+
\b(?i:neq|is\s+not)\b |
540540
!= | # equality left-to-right both
541-
\b(?i:neq)\b
541+
\b(?i:eq|is)\b
542542
scope: keyword.operator.comparison.binary.cfml
543543
push: expression-begin
544544
- match: \b(?i:(contains|does\s+not\s+contain))\b

syntaxes/cfscript.sublime-syntax

+2-2
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,9 @@ contexts:
540540
=== | # equality left-to-right both
541541
!== | # equality left-to-right both
542542
== | # equality left-to-right both
543-
\b(?i:eq)\b |
543+
\b(?i:neq|is\s+not)\b |
544544
!= | # equality left-to-right both
545-
\b(?i:neq)\b
545+
\b(?i:eq|is)\b
546546
scope: keyword.operator.comparison.binary.cfml
547547
push: expression-begin
548548
- match: \b(?i:(contains|does\s+not\s+contain))\b

syntaxes/src/cfscript.sublime-syntax.yaml-macros

+2-2
Original file line numberDiff line numberDiff line change
@@ -471,9 +471,9 @@ contexts:
471471
=== | # equality left-to-right both
472472
!== | # equality left-to-right both
473473
== | # equality left-to-right both
474-
\b(?i:eq)\b |
474+
\b(?i:neq|is\s+not)\b |
475475
!= | # equality left-to-right both
476-
\b(?i:neq)\b
476+
\b(?i:eq|is)\b
477477
scope: keyword.operator.comparison.binary.cfml
478478
push: expression-begin
479479
- match: \b(?i:(contains|does\s+not\s+contain))\b

syntaxes/tests/syntax_test_cfml.cfm

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@
7474
<cfif col eq 1>
7575
<!--- ^ meta.tag.cfml source.cfml.script variable.other.readwrite.cfml --->
7676
77+
<cfif col is 1>
78+
<!--- ^^ meta.tag.cfml source.cfml.script keyword.operator.comparison.binary.cfml --->
79+
80+
<cfif col is not 1>
81+
<!--- ^^^^^^ meta.tag.cfml source.cfml.script keyword.operator.comparison.binary.cfml --->
82+
7783
<cfset f.result = componentCall(
7884
component="#f.componentName#",
7985
<!--- <- meta.function-call.cfml meta.function-call.parameters.cfml entity.other.function-parameter.cfml --->

0 commit comments

Comments
 (0)