MadcapJake / language-perl6fe

»ö« Atom Perl 6 Support - Forgotten Edition »ö«
https://github.com/perl6/atom-language-perl6
Other
16 stars 3 forks source link

Hash marks in quote constructs incorrectly parsed as comments #10

Closed zoffixznet closed 8 years ago

zoffixznet commented 8 years ago

As the title says. Here's the example of the image of the parsing issue and below is the actual code: hash

my $irc = IRC::Client.new(
    :host('localhost'),
    :channels<#perl6bot #zofbot>, :testy('mactest'),
    :debug,
    plugins => [
        IRC::Client::Plugin::Debugger.new
    ]
).run;
MadcapJake commented 8 years ago

This one I'll need some time to figure out a solution to.

MadcapJake commented 8 years ago

I've found a quick fix by just moving the quoteword rule. However if this becomes an issue again, I think I might need to separate out adverbial postcircumfix quotewords to capture this.

If you type:

10 < 100 # but it is > 5

The highlighter (unlike the github version) will think that everything within the two angle-brackets is a quoteword construct. However, I feel that, since these are comments, it's not really terribly likely that someone will have a > on the same line as a < and if so, you could just spell it out or move it above or below the line. However, as I said, if this does become a problem, I think we could solve it by creating a special case rule for adverbial postcircumfix quotewords (which I might end up doing anyways as I really am starting to get uncomfortable with the hackishness of the quoteword rule)

zoffixznet commented 8 years ago

:+1: