Skip to content

Commit ef3ea6f

Browse files
hediyisanssecours
authored andcommitted
Refine grammar of logical operators
Fixes atom/language-ruby#138
1 parent 9762ae6 commit ef3ea6f

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

Syntaxes/Ruby.plist

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,16 +228,6 @@
228228
<string>meta.syntax.ruby.start-block</string>
229229
</dict>
230230
<dict>
231-
<key>comment</key>
232-
<string> as above, just doesn't need a 'end' and does a logic operation</string>
233-
<key>match</key>
234-
<string>(?&lt;!\.)\b(and|not|or)\b</string>
235-
<key>name</key>
236-
<string>keyword.operator.logical.ruby</string>
237-
</dict>
238-
<dict>
239-
<key>comment</key>
240-
<string> just as above but being not a logical operation</string>
241231
<key>match</key>
242232
<string>(?&lt;!\.)\b(alias|alias_method|block_given[?]|break|defined[?]|iterator[?]|next|redo|retry|return|super|undef|yield)(\b|(?&lt;=[?]))(?![?!])</string>
243233
<key>name</key>
@@ -1699,7 +1689,15 @@
16991689
</dict>
17001690
<dict>
17011691
<key>match</key>
1702-
<string>(?&lt;=[ \t])!+|\bnot\b|&amp;&amp;|\band\b|\|\||\bor\b|\^</string>
1692+
<string>(?&lt;!\.)\b(and|not|or)\b(?![?!])</string>
1693+
<key>name</key>
1694+
<string>keyword.operator.logical.ruby</string>
1695+
</dict>
1696+
<dict>
1697+
<key>comment</key>
1698+
<string>Make sure this goes after assignment and comparison</string>
1699+
<key>match</key>
1700+
<string>(?&lt;=^|[ \t])!|&amp;&amp;|\|\||\^</string>
17031701
<key>name</key>
17041702
<string>keyword.operator.logical.ruby</string>
17051703
</dict>

0 commit comments

Comments
 (0)