LSL syntax highlighting bug
|
|
Kermitt Quirk
Registered User
Join date: 4 Sep 2004
Posts: 267
|
11-02-2004 18:59
I found a small bug in the LSL editor last night and I can't seem to find any mention of it in the forums. It relates to putting a quote character in a string using the escape syntax (e.g. "\""  When you put that in a script it compiles and works as expected however the highlighting suggests the quotes are still open. Here's alittle script that shows the problem quite clearly... (I'm actually at work atm so I don't have SL availble so this code is off the top of my head. Pretty simple though so I'd be surprised if there's any typos.) default { state_entry() { llSay(0, "\""); }
touch_start(integer num_detected) { llSay(0, "Touched!"); } }
What you should see when you put that into the LSL editor is that everything after the point where the "\"" appears will be in green. Except for the "Touched!" which will be black. Basically the string syntax highlighting has been reversed because there's an odd number of quotes. However, as I said it compiles correctly and when you run it you should see the object say ". This came up becuase someone was using an if statement to try and test for a quote within another string. Probably not something that would happen very often, but very annoying when it does. Has this ever been brought up before? Are Linden Labs aware of it?
|
|
Moleculor Satyr
Fireflies!
Join date: 5 Jan 2004
Posts: 2,650
|
11-02-2004 19:20
Yeeeeh, everyone's pretty much aware of it, LL's never bothered to fix it. Maybe it's something they'll actually fix in this round of bug fixing?
|
|
Andrew Linden
Linden staff
Join date: 18 Nov 2002
Posts: 692
|
11-03-2004 10:22
I don't think it has been fixed yet, so I filed it into our bugzilla database. It won't be in 1.5.6 but it might be in 1.5.7.
|
|
Morgaine Dinova
Active Carbon Unit
Join date: 25 Aug 2004
Posts: 968
|
11-03-2004 10:31
WTB bugzilla logs 
|
|
Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
|
11-03-2004 12:42
Tisk. Xylor reported that one ages ago. There's even a comment about it in the ever-popular XyText script. He adds a comment to the end of the like with the slashed quote with another quote in it.
_____________________
~ Tiger Crossing ~ (Nonsanity)
|
|
Don Linden
Bug Reaper
Join date: 14 Jun 2004
Posts: 58
|
11-15-2004 09:48
This bug is fixed in the next patch =)
_____________________
Its not a glitch, its a feature.
|
|
Ace Cassidy
Resident Bohemian
Join date: 5 Apr 2004
Posts: 1,228
|
11-15-2004 10:25
From: Don Linden This bug is fixed in the next patch =) wee haw!!! I reported this one about 6 months ago... annoying when you need to use "\"", but not a show stopper. - Ace
_____________________
"Free your mind, and your ass will follow" - George Clinton
|
|
Ace Cassidy
Resident Bohemian
Join date: 5 Apr 2004
Posts: 1,228
|
11-15-2004 10:27
The good thing about this bug is that when you use "\"", you're usually using another "\"" to end the quote, so the LSL editor gets its knickers untwisted.
- Ace
_____________________
"Free your mind, and your ass will follow" - George Clinton
|
|
Don Linden
Bug Reaper
Join date: 14 Jun 2004
Posts: 58
|
11-15-2004 12:11
As a workaround until the next patch, you 'fix' the editor window's confusion by putting another \" in a comment. Like so: llSay(0, "\""); // \" (This comment fixes the syntax highlighting bug)
_____________________
Its not a glitch, its a feature.
|
|
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
|
11-16-2004 04:57
while on the topic could we get a copy of the lex file used by the LSL compiler? the old one is almost a year out of date. (can be found on your favorite wiki mirror)
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river. - Cyril Connolly
Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence. - James Nachtwey
|