Fixes to syntax

marcos.placona

Senior Member
This is just something a bit annoying I noticed on AxePad.

If you have code like this:

Code:
#rem
	sertxd(10)
#endrem
Quite rightly, the syntax colour will turn green, as you have some code inside comments.

However, I've also noticed that when trying to use a variable (numeric) that starts with rem (such as reminder, remainder etc), with the current syntax file, something like:

Code:
sertxd(#remainder,10)
Would also turn green, and make everything that comes after it turn green as well, which would normally force you to use a different variable name in order to keep the syntax colour.

By going to the file picaxe.xml (under syntax), i was able to change line 17 from:

Code:
<startRegEx>\#rem</startRegEx>
to:

Code:
<startRegEx>\#rem$</startRegEx>
Not a great deal really, but I figured that as the parser simply works based on a regular expression, I could modify it, so it would only apply the "comment colour" for something that starts and ends like this: #rem, but things like #reminder or #remainder would still get colourized.

I don't know if there's anywhere else I could be posting this, or even if Rev-Ed supports code contribution.

Worth a shot ;)

hope that helps anyone
 
Top