A line like
myVar := lastVar + nextVaris outlined as label definition
Even worse, because I usually indent those lines with tabs, the outliner shows a square for every tab...
myVar := lastVar + nextVaris outlined as label definition
No space in a label definition (which accepts otherwise almost all Ascii chars! Except comma, percent and backtick (and of course colon!). A label cannot start with these, nor with semi-colon (as it would be a comment!). And after the colon, you cannot have anything except comments.A line like
myVar := lastVar + nextVaris outlined as label definition
labels = !"#$&'()*+-./<=>?@{|}~ Loop Parse, labels { c := A_LoopField Gosub %c%L } c = `; Gosub L;L MsgBox %r% Return !L: "L: #L: $L: ; Not label %L: &L: 'L: (L: )L: *L: +L: ; Not label ,L: -L: .L: /L: ; Not label :L: ; Not label ;L: L;L: <L: =L: >L: ?L: @L: ; Not label `L: {L: |L: }L: ~L: r = %r%%c% Return
I think I´ll leave the exact recognizing regexp up to jonib but as quick hack, I was able to eliminate the false labels by altering the code in ahk.hrc fromNo space in a label definition (which accepts otherwise almost all Ascii chars! Except comma, percent and backtick (experimental list! May be incomplete). A label cannot start with these, nor with colon and semi-colon... And after the colon, you cannot have anything except comments.
<scheme name="Labels"> <regexp match="/^(?{ahkOutline}%varname;:[^;]*)/i" region="Label"/> </scheme>to
<scheme name="Labels"> <regexp match="/^(?{ahkOutline}%varname;:[^;=]*)/i" region="Label"/> </scheme>(note the equals character)
Hi, one more question: how can I define the colors I want to use? I had a look at the ahk.hrc file but cannot find out where to set the colors...
There are probably many more like this as I wanted to know what I could get working while I learned the Colorer syntax, but if you find more problems and can fix them, less work for me :twisted:I agree with PhiLho that parsing ahk scripts is not an easy task... I´ve found one more annoyance the outliner stumbles over:
A line likemyVar := lastVar + nextVaris outlined as label definition
Even worse, because I usually indent those lines with tabs, the outliner shows a square for every tab...
I assumed labels used the same characters as variables. and thanks for the label syntax testing script.No space in a label definition (which accepts otherwise almost all Ascii chars! Except comma, percent and backtick (and of course colon!). A label cannot start with these, nor with semi-colon (as it would be a comment!). And after the colon, you cannot have anything except comments.
It should at least work better then before.<scheme name="Labels"> <regexp match="/^(?{ahkOutline}%varname;:[^;=]*)/i" region="Label"/> </scheme>(note the equals character)
I don´t know if it will have some unwanted side effects...
Hi @ all,
anything changes made since jun2006, the date from the last post? An plugin for the eclipse ide is an very good idea...
Regards
M'o