Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

'/' As a metaoperator breaks syntax highlighting #34

Open
zoffixznet opened this issue Jul 1, 2016 · 0 comments · May be fixed by #43
Open

'/' As a metaoperator breaks syntax highlighting #34

zoffixznet opened this issue Jul 1, 2016 · 0 comments · May be fixed by #43
Milestone

Comments

@zoffixznet
Copy link
Contributor

Issue Description

When division operator is used as a metaoperator ([/]) the stuff that follows it has broken syntax highlighting. Possibly because it gets interpreted as a regex start.

Example Code

grammar Ratifier {
    token TOP {
        [ <digits> '.' <digits> <.ws> <succ> ]+
    }
    token digits { \d+ }
    token succ   { <?> }
}

say [/] 1, 2, 3, 4;
my $x = 42;

class RatifierActions {
    has @!digits;
    method digits ($/) { @!digits.push: +$/ }
    method succ ($) {
        say "@!digits.join('.') can be written as {([/] @!digits).Rat}";
    }
}

Ratifier.parse: '2.55 ', actions => RatifierActions.new;

Picture

untitled

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants