Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent highlighting #67

Open
4 tasks
zoffixznet opened this issue May 12, 2017 · 4 comments
Open
4 tasks

Inconsistent highlighting #67

zoffixznet opened this issue May 12, 2017 · 4 comments

Comments

@zoffixznet
Copy link
Contributor

zoffixznet commented May 12, 2017

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 than MONKEY-TYPING Fixed in 5f79d71 and af61e21 (please double check I didn't mess up the regex)

  • The IO::Testo::Tester has IO part highlighted in different colour; appears to be due to there being an IO core type/namespace, as Foo::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 from plan or from is-eqv and is-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]

z

Leave this in. For internal use.

  • Fixed in Master
  • Fixed in Release
  • Has Tests
  • Passes Tests
@jnthn
Copy link

jnthn commented May 12, 2017

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. :-)

zoffixznet added a commit that referenced this issue May 12, 2017
@samcv
Copy link
Collaborator

samcv commented May 12, 2017

  • The IO::Testo::Tester has IO part highlighted in different colour; appears to be due to there being an IO core type/namespace, as Foo::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 from plan or from is-eqv and is-run methods; possibly because it gets highlighted as a trait

I 👍 @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!

@zoffixznet
Copy link
Contributor Author

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.

@samcv
Copy link
Collaborator

samcv commented May 12, 2017

Ah yes. Agreed.

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

No branches or pull requests

3 participants