bscan / RakuNavigator

Raku language support and language server
MIT License
50 stars 3 forks source link

Syntax: Unrecognized character name [ENTER MARK] #2

Closed heyajulia closed 2 years ago

heyajulia commented 2 years ago

Thanks for building this!

The following code:

say "\c[CHECK MARK]";

results in an error:

Syntax: Unrecognized character name [ENTER MARK]
raku navigator

CHECK and ENTER are both phasers, so maybe that's where it gets confused?

bscan commented 2 years ago

Thanks for the report! The original parsing code I borrowed from https://github.com/Raku/Raku-Parser/blob/master/lib/Perl6/Parser.pm6 which tried to remove BEGIN and CHECK blocks for safer compilation (otherwise raku -c and similar compilation methods run those phasers). Although a good idea, it appears to cause a number of issues. Looking around, the other solutions I found seems to simply compile the code without modification (e.g. flycheck-raku, all the perl language servers). Removing those code modifications for now until a more robust method is found.