-
Notifications
You must be signed in to change notification settings - Fork 582
dartpad: Implement external and abstract variables #1614
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
Comments
Note: I believe this is mostly updating the codemirror syntax highlighting. @eernstg, is there some good sample code to test against? The files in https://github.com/dart-lang/sdk/tree/master/tests/language/external_abstract_fields? |
I tried abstract_fields_test.dart and external_fields_test.dart in dartpad.dev and they both appear to be rendering in CodeMirror as I'd expect. If we need to make a change to CodeMirror's Dart parsing, we need to be aware that CodeMirror has a monthly release cadence (on the 20th, give or take), and I try to keep codemirror.dart updated on a timely basis. |
I believe that if you see |
Exactly. Looks like it does work already! |
@eernstg is this safe to close, or do you want to wait on a null safety release with these features included? |
Depends on whether there is more dartpad specific work to do: The underlying tools (analyzer and compiler) have their own implementation tasks (dart-lang/sdk#41940, dart-lang/sdk#42718), and they are closed, so it seems likely that the only remaining work for dartpad is syntax highlighting. |
Assigning this to @RedBrogdon to bundle testing this with the next null safety update. |
Any updates on this? |
Any update? |
@RedBrogdon What is the current status? |
From #1614 (comment), it looks like this is already working? |
AFAICT, abstract variables are working just fine: https://nullsafety.dartpad.dev/e5ace6215b5779c9b41ae5a136a9c1fd External variables are highlighted correctly and cause no analyzer errors, but will not compile. This code, for example: external int something;
external String toString();
void main() {
} Produces this error when compiled:
|
@RedBrogdon Great, thanks! The external behavior is WAI I believe. |
Cf. the implementation plan, the addition of external and abstract variables to Dart may require some updates.
https://github.com/codemirror/CodeMirror/blob/master/mode/dart/dart.js already recognizes
external
andabstract
as keywords, so this might be working already.The text was updated successfully, but these errors were encountered: