Skip to content

Commit 25203d9

Browse files
committed
Fix >=? accidentally matched as operator
1 parent ac181a1 commit 25203d9

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

ReScript.sublime-syntax

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ contexts:
127127

128128
operator:
129129
- match:
130-
'->|\|\||&&|\+\+|\*\*|\+\.|\+|-\.|-|\*\.|\*|/\.|/|\.\.\.|\.\.|\|>|===|==|\^|:=|!|>=|<='
130+
'->|\|\||&&|\+\+|\*\*|\+\.|\+|-\.|-|\*\.|\*|/\.|/|\.\.\.|\.\.|\|>|===|==|\^|:=|!|>=(?! *\?)|<='
131131
scope: keyword.operator
132132

133133
assignment:

syntax_test.res

+11
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,17 @@ let getCenterCoordinates = (aBla, doHello, ~b=1, ~c, ()) => {
112112
//^^ keyword.operator
113113
// ^^ keyword.operator
114114

115+
a >= b
116+
//^ keyword.operator
117+
let f: (~radius: option<int>=?) = 1
118+
// ^ source.res
119+
// ^ keyword.operator.assignment
120+
// ^ punctuation.separator
121+
let f: (~radius: option<int>= ?) = 1
122+
// ^ source.res
123+
// ^ keyword.operator.assignment
124+
// ^ punctuation.separator
125+
115126
type profession = Teacher | Director
116127
// ^ source.res
117128
/* test */

0 commit comments

Comments
 (0)