BUG: Syntax coloring...or comment extension

Started by monkey0506, Wed 29/11/2006 00:05:13

Previous topic - Next topic

monkey0506

I'm not sure exactly how it's intended to work, but if you append a '\' to the end of a single-line comment the next line appears to be a comment (i.e., it is colored green), but it isn't actually made into one.

Code: ags
import function my_func(); // does some stuff\
this line is green but it's not actually commented


If there's anything AFTER the '\' then the non-comment line appears in normal colors, it only happens if the '\' is at the very end.

Radiant

AGS syntax is based on the C programming language, in which you can extend a line to the next one by appending a backslash (which is mainly used for string concatenation and easier display of oneliners). It seems the syntax highlighter uses this part of C but the AGS interpreter does not.

Gilbert

Well, CJ used a third party library for the text editor part, so settings in it probably follow some standards (like C for example) by default.

monkey0506

That's understandable...but if possible it would be nice if something could be done to change this behaviour (whether the non-comment line could be forced to appear in normal colors or it could be made into a comment).

Pumaman

It looks like this is an issue with the third-party component, and to be honest it's so minor that I'm not going to spend any time investigating it myself. If anyone else feels like looking through the Scintilla source code to work out what's causing this, it'd be appreciated.

SMF spam blocked by CleanTalk