atom-language
atom-language copied to clipboard
Inconsistent highlighting
Not sure if much can be done about it, but I notice several cases of inconsistent highlighting in the code below:
-
~~
MONKEY-GUTS
is highlighted different thanMONKEY-TYPING
~~ Fixed in https://github.com/perl6/atom-language-perl6/commit/5f79d719fefb8dfddcaa4a526618cb862c1b9b5f and https://github.com/perl6/atom-language-perl6/commit/af61e211552f78f8b51b6ee3d6593fcaf2401e3e (please double check I didn't mess up the regex) -
The
IO::Testo::Tester
hasIO
part highlighted in different colour; appears to be due to there being anIO
core type/namespace, asFoo::Testo::Tester
highlights fine -
plan
method is highlighted as a routine, even though AFAIK there's no such core method -
is
method is highlighted differently fromplan
or fromis-eqv
andis-run
methods; possibly because it gets highlighted as a trait -
Even though
@test %test &test
are just text, they get highlighted differently from*test
, as if they were variables
Example Code
unit module Testo;
use IO::Testo::Tester;
use Foo::Testo::Tester;
use MONKEY-GUTS;
use MONKEY-TYPING;
our $Tester = Testo::Tester.new;
sub plan (|c) is export { $Tester.plan: |c }
sub is (|c) is export { $Tester.is: |c }
sub is-eqv (|c) is export { $Tester.is-eqv: |c }
sub is-run (|c) is export { $Tester.is-run: |c }
say "@test %test &test *test";
Picture [optional]
Leave this in. For internal use.
- [ ] Fixed in Master
- [ ] Fixed in Release
- [ ] Has Tests
- [ ] Passes Tests
I'd personally prefer it if we were to highlight things that are method calls or routines calls based on the syntax of them being that, rather than based on whether there's a built-in method or routine with that name. It's especially odd when you write a web framework that exports get
, put
, post
, and delete
routines; get
and put
end up colored differently to post
and delete
, even though the get
and put
you'll be calling are not those from CORE.setting at all. :-)
- The
IO::Testo::Tester
hasIO
part highlighted in different colour; appears to be due to there being anIO
core type/namespace, asFoo::Testo::Tester
highlights fine
The modules that are use
'd are not highlighted at all and that is their default color. Will need an issue to track actual highlighting of use
's
plan
method is highlighted as a routine, even though AFAIK there's no such core method
Do you think plan shouldn't highlight? I think it's common enough that it's somewhat expected since it's part of Rakudo proper.
is
method is highlighted differently fromplan
or fromis-eqv
andis-run
methods; possibly because it gets highlighted as a trait
I :+1: @jnthn's comment above. Please open an issue for that separately.
- Even though
@test %test &test
are just text, they get highlighted differently from*test
, as if they were variables
Go ahead and open an issue for this one as well.
Thanks!
Do you think plan shouldn't highlight? I think it's common enough that it's somewhat expected since it's part of Rakudo proper.
It isn't. There's a subroutine named plan, but no method.
Ah yes. Agreed.