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

Implement the Q1 2021 small features release in external syntax highlighting tools. #44919

Closed
4 tasks done
leafpetersen opened this issue Feb 9, 2021 · 4 comments
Closed
4 tasks done
Assignees

Comments

@leafpetersen
Copy link
Member

leafpetersen commented Feb 9, 2021

Implementation issue for syntax highlighting associated with this set of features.

cc @devoncarew @franklinyow

@lrhn
Copy link
Member

lrhn commented Feb 9, 2021

The Github syntax highlighting appears to be trivially satisfied:

@Annot<T Function<T>(T)>()
void main() {
  var c = Annot<T Function<T>(T)>();
  c >> 2;
  c >>> 3;
  c >>>> 4;
}
class Annot<T extends T Function<T>(T)> {
  const Annot();
  int operator >>>>(int x) => x;
  int operator >>>(int x) => x;
  int operator >>(int x) => x;
}

It's not complicated enough to recognize that type arguments belong to an annotation, or that they can't be generic function types, so those already worked like any other type argument.
The >>> operator is already recognized, likely because it just recognizes any sequence of operator characters.

@devoncarew
Copy link
Member

I believe we're good from the POV of codemirror as well; this is from dartpad:

Screen Shot 2021-02-09 at 1 06 48 PM

@devoncarew
Copy link
Member

@srawlins - do you mind confirming that highlight.js is good as is (doesn't need any changes)?

@srawlins
Copy link
Member

srawlins commented Feb 9, 2021

Agree.

@srawlins srawlins closed this as completed Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants