Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 18, 2015 22:10:34 GMT -5
I read in the documentation that multi-line comment are not supported.
/* comment comment comment comment */
Maybe it is possibly to color first and last line.
/* comment comment comment comment */
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 18, 2015 23:55:25 GMT -5
I don't ask for multi-line support because I assume it is difficult to implement.
But I think to color the last line is as easy as to color the first line, because it is inverse/reverse logic. (sorry, I don't know the right word: reverse or inverse or contrary)
"string /* string" already works ok,
so I think there will be no problem with string ("string */ string")
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 19, 2015 11:40:49 GMT -5
I think to keep it simple, it is enough to parse from left to right:
These cases are comments (95% all cases) 1. text_without_qoutes */ other_text 2. */ 3. **********/
Remaining cases (maybe 5%) are not marked as comment (regardless if they could be comments): 4. text_with_some _quotes */ other_text 5. var a = "bla bla */ bla "
|
|
|
Post by nicc on Jun 20, 2015 3:08:29 GMT -5
/*-----------------------------------*/ /* Of course, one way to resolve it */ /* is like this which is what I do */ /* anyway. Never been a fan of */ /* starting a comment on one line */ /* and having the other delimiter on */ /* another line. */ /*-----------------------------------*/
|
|
|
Post by George on Jun 20, 2015 11:24:23 GMT -5
I have to agree with Nicc. I've been caught off guard looking at other peoples code and found blocks of real code commented out with a couple simple /* */ lines. But not noticing the fact it was commented since the code lines look perfectly normal, especially if it's a large block spanning multiple screens.
But then we all have our own comment styles, but why some languages have multiple varieties is beyond me.
I've been privately chatting with Robert on this, and I'll say here what I said to him. Multi-line comments are not going to be supported. The colorization is performed right at the point text is displayed, this is so I can support colorizing text lines as they are typed, and there is no way during keyboard entry I want to get involved in back-scans or searches of previous data lines.
George
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 20, 2015 13:42:25 GMT -5
OK. Jonas
|
|
|
Post by Jo on Jun 20, 2015 14:36:58 GMT -5
ooRexx also uses /* */ multiline Comments, but here they can be nested. And as in C/C++ there is a singeline-comment (--). And there are two types of string demimiter: single ' and double ". Therefore I tried to write a SPFLite Macro - just for fun - to pen-color the remaining text not colored by AUTO-colorization. So in fact I wrote that macro but it works just with small files, I think I did not really understand the thinBasic Flow Control concept :-(
Jo
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 20, 2015 14:41:35 GMT -5
When you are done and it works 90% ok, please put it out here
|
|
|
Post by George on Jun 21, 2015 12:00:20 GMT -5
Jo: Yes, I'm sure we'd all like to see how you did.
George
|
|
|
Post by George on Jun 21, 2015 12:43:18 GMT -5
I agree with Robert. I know he and I are really 'old school', but there are times I miss the old days with program source residing in several boxes of punch cards and calling it a good day when you could pack up your source, ship it to the Computer room, and get it back with the compiler listing - TWICE in one day.
And sometimes praying because you were lazy and weren't consistent in punching sequence numbers in the source cards. Heaven help you if somebody dropped your cards boxes and now you couldn't sort the source back into sequence. Thinking back it's amazing that anything ever got completed and into production.
Multi-line comments in that environment? Laughable.
George
|
|
|
Post by Jo on Jun 21, 2015 13:49:21 GMT -5
Some decades ago, we had to change all our PL/I programs from CHARSET(48) to CHARSET(60) and I wrote a program in PL/I to cope for this. Comments and literals in PL/I are slightly easier than in ooRexx. And my PL/I knowledge is 40 years vs some days for SPFLite thinBasic Macros. Therefore I stopped working on my CoCo.Macro and normally would not share it. But if Jonas is willing to take a look into a 90% program, ok, here it is: CoCo.Macro (3.91 KB) Jo
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 22, 2015 0:47:54 GMT -5
Thanks to Jo. I tried it with some of my C++ files. It works great. Jonas
|
|