Home Download Buy Blog Forum Support

Highlighting && operator

Highlighting && operator

Postby Kalamity on Tue Apr 23, 2013 4:56 pm

High, im trying to get the " && " operator to highlight. For example
If (var = 1 && var2 = 2)

I have been attempting to modify the operator section within the Autohotkey.tmLanguage file
Code: Select all
        <dict>
            <key>name</key>
            <string>keyword.operator.ahk</string>
            <key>match</key>
            <string>=|==|&lt;&gt;|:=|&lt;|&gt;|\*|\/|\+|:|\?|\-|!=|.=||\|\|</string>
        </dict>


I was able to get the " || " (or) operator to highlight, but it seems I can't find the magic combination for the && operator?
I've tried \&\&, &{2} and a couple of others.

Many thanks in advance.

Cheers.
Kalamity
 
Posts: 2
Joined: Tue Apr 23, 2013 4:50 pm

Re: Highlighting && operator

Postby FichteFoll on Tue Apr 23, 2013 5:37 pm

Try
Code: Select all
<string>=|==|&lt;&gt;|:=|&lt;|&gt;|\*|\/|\+|:|\?|\-|!=|.=||\|\||&amp;&amp;</string>
as used in JavaScript.tmLanguage.
FichteFoll
 
Posts: 388
Joined: Fri Mar 16, 2012 11:49 pm
Location: Germany

Re: Highlighting && operator

Postby Kalamity on Tue Apr 23, 2013 6:19 pm

Thanks mate, that worked a treat.
Kalamity
 
Posts: 2
Joined: Tue Apr 23, 2013 4:50 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot], henry_t and 22 guests