-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Support scripts w/ @main
#163
Comments
I agree with your suggested approach. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be nice if swift-sh would support scripts that contain the new
@main
. Like:Suggested implementation:
@main
or maybe@main[\t\n ]+struct
if the script itself is not calledmain.swift
main.swift
but instead keep the original script name (like MyTool.swift)main.swift
@main
), and add this to thePackage.swift
:Another option might be to use the hashbang line to configure an explicit mode? Like:
The text was updated successfully, but these errors were encountered: