Open staycoolcall911 opened 1 year ago
@eladb Originally wanted the syntax for extern to be extern("path")
instead of extern "path"
.
I didn't like this because it felt strange to introduce a function-call-esque modifier that didn't match other modifiers. I still feel this way, but it's not like the current method is any less unique (in a bad way).
Now that we've had it for a while, pragmatically I think it makes sense to change it to extern("path")
instead.
It also makes this issue significantly easier to implement. This syntax change shouldn't be difficult and IMO can be implemented as part of this issue
I'm not sure not having a completion is a bug per se (an LSP can't come up with every possible thing you can type at every position in your code), but otherwise I agree with what Mark said above.
As a related improvement, if you write
class A {
extern foo(): str;
}
It will help if we provide a helpful syntax error, like "Missing file name after extern. Try extern "./file.js"
" instead of "Unknown parser error"
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
I tried this:
Add an
extern
function. There's no way for me to figure out the syntax unless I copy it from an example or the language reference. My code:This happened:
No completion for the
extern
syntax:I expected this:
To get a guiding docstring or syntax completion.
Is there a workaround?
No response
Component
IDE Extension
Wing Version
0.26.7
Node.js Version
18.15.0
Platform(s)
MacOS
Anything else?
No response
Community Notes