Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10712

    Meir
    Participant

    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…? 🙁

    #10717

    Yutaka Emura
    Keymaster

    Hello,

    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!

    #10720

    QiaoJiao
    Participant

    Perl is too messy, use Python.
    This will solve a problem.

    #10721

    Meir
    Participant

    To whoever can understand this ancient language, written in ASCII graphems:

    Mit eitzes binech bazorgt shoin!

    #11163

    Meir
    Participant

    In 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???

    #11164

    Yutaka Emura
    Keymaster

    Hello,

    I see. I will have to consider improvements about line comments in future versions. For example, using regular expressions to specify line comments.

    Thanks!

    #11165

    Meir
    Participant

    Yes, 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.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Share with friends... Tweet about this on TwitterShare on FacebookShare on Google+Email this to someone