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

syntax highlighters implementation for super-initializer parameters #48060

Closed
3 tasks done
Tracked by #48055
devoncarew opened this issue Jan 4, 2022 · 5 comments
Closed
3 tasks done
Tracked by #48055
Labels
area-tools A meta category for issues that should be addressed by tooling (prefer more concrete areas).

Comments

@devoncarew
Copy link
Member

devoncarew commented Jan 4, 2022

See #48055 for the main tracking issue.

@devoncarew devoncarew added the area-tools A meta category for issues that should be addressed by tooling (prefer more concrete areas). label Jan 4, 2022
@itsjustkevin
Copy link
Contributor

@devoncarew who is the person to confirm this task is closed out?

@devoncarew
Copy link
Member Author

@DanTup for dart-syntax-highlighting; @srawlins for highlight.js; @domesticmouse for codemirror. I'll add ldaps to the checklist above. Often, there isn't any work for this syntax highlighters for new language features, but we need to check (and do any work that may be required).

@srawlins
Copy link
Member

srawlins commented May 5, 2022

highlight.js seems to work out-of-the-box. super is highlighted exactly as this, as a keyword.

@domesticmouse
Copy link
Member

Putting the below sample into DartPad shows CodeMirror treating super.parameter equivalent to this.parameter:

class B {
  final int foo;
  final int bar;
  final int baz;
  B(this.foo, this.bar, [this.baz = 4]);
}
class C extends B {
  C(super.foo, super.bar, [super.baz = 4]);
}

@DanTup
Copy link
Collaborator

DanTup commented May 9, 2022

The same is true for VS Code, super is treated just like this.

Textmate Grammar (from dart-syntax-highlight/):

Screenshot 2022-05-09 at 09 58 17

Semantic Tokens (from the LSP server):

Screenshot 2022-05-09 at 09 58 58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-tools A meta category for issues that should be addressed by tooling (prefer more concrete areas).
Projects
None yet
Development

No branches or pull requests

5 participants