- AuthorPosts
- January 4, 2013 at 10:25 am #10712MeirParticipant
Dear Yutaka,
In Perl at least, sometimes the comment character ‘#’ is a part of the syntax. EE does ignore its commenting-out nature when it is part of a string. However, at least in the following example it does color the rest of the line as comment:
my @list = (‘string 1’, 2, 4, ‘string 2’);
for my $i (0 .. $#list) {
…
}
everything beyond the ‘#’ is colored ‘comment’.Did I missed a feature again…? :-(
January 5, 2013 at 1:53 am #10717Yutaka EmuraKeymasterHello,
This is because ‘#’ is defined as a Line Comment on the Highlight (2) tab of Perl configuration properties. You can remove the ‘#’ from the Line Comment text box. This is the only way to solve the issue.
Thanks!
January 5, 2013 at 1:23 pm #10720QiaoJiaoParticipantPerl is too messy, use Python.
This will solve a problem.January 5, 2013 at 5:04 pm #10721MeirParticipantTo whoever can understand this ancient language, written in ASCII graphems:
Mit eitzes binech bazorgt shoin!
June 19, 2013 at 1:32 pm #11163MeirParticipantIn fact, what I forgot to mention is that the problem is not the coloring. I can live with that!
A more serious problem is that the matching parenthesis pairing is messed up. This IS a problem!
Removing the ‘#’ from the Line Comment text field in the Highlight(2) tab of Perl configuration properties will create a lot more problems than “solved”.
Can that be fixed???
June 19, 2013 at 5:12 pm #11164Yutaka EmuraKeymasterHello,
I see. I will have to consider improvements about line comments in future versions. For example, using regular expressions to specify line comments.
Thanks!
June 19, 2013 at 7:40 pm #11165MeirParticipantYes, that would be great if you could find a way…
In fact, may be any coloring or other stuff could be specified by a regex.
EDIT: There are also other cases where the coloring/syntax is wrongly interpreted. For example, when a Perl scalar is named ‘$pos’, the ‘pos’ part is colored red, being (also!) a standard Perl function. But here it is a scalar identifier, and it should have been colored blue. And yes, indeed, a RegEx looking for a Perl “sigil” ($, \%, @, & and more) concatenated with “w” will always color it as an identifier.
- AuthorPosts
- You must be logged in to reply to this topic.