-
Notifications
You must be signed in to change notification settings - Fork 589
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
[D] Syntax Improvements #1850
[D] Syntax Improvements #1850
Conversation
@wbond Thanks for the review, I think I've responded/fixed most of it. In terms of the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were a few comments that I didn't see a response to, or a change related to. I believe everything else that you replied to I either resolved or left my thoughts on what I think should happen.
This round I added some comments with specific meta.
scopes we should probably add. Additionally pairs of parens and braces should get meta.parens
and meta.braces
(or meta.block
) for the symbols and everything between them. The official docs about meta.
scopes include a few others. I may have missed some situations where they would be appropriate: https://www.sublimetext.com/docs/3/scope_naming.html#meta.
Here are a few constructs from the dub codebase that seem not to be handled properly, although the issue for some may just be my understanding. 🙂 https://github.com/dlang/dub/blob/master/source/dub/internal/vibecompat/core/log.d#L65 appender!string() The https://github.com/dlang/dub/blob/master/source/dub/internal/vibecompat/core/log.d#L69 auto threadid = () @trusted { The https://github.com/dlang/dub/blob/master/source/dub/commandline.d#L243 dub = new Dub(NativePath(getcwd())); Right now https://github.com/dlang/dub/blob/master/source/dub/description.d#L49 Exception("Package '"~name~"' not found in dependency tree.") Right now the https://github.com/dlang/dub/blob/master/source/dub/dub.d#L128 PackageSupplier[] m_packageSuppliers;
https://github.com/dlang/dub/blob/master/source/dub/dub.d#L764 final switch (list_type) with (ListBuildSettingsFormat) { The https://github.com/dlang/dub/blob/master/source/dub/dub.d#L958 (a, b) => a.version_ < b.version_
https://github.com/dlang/dub/blob/master/source/dub/init.d#L124-L141 What exactly is this here? It seems to be D code, but inside of an unquoted string. https://github.com/dlang/dub/blob/master/source/dub/init.d#L181-L196 Are the |
Can't be reliably parsed as
Is another parsing ambiguity, though one that we could probably special-case. The following is a worst-case:
|
This is a complete re-implementation of the D syntax highlighting to support all current features and mark entities correctly. I've validated correctness by going through some portion of the D standard library and vibed.
Also includes improvements to the build system, with error highlighting and dub support.