Skip to content

Commit

Permalink
Add Swift shebang to syntax (#3451)
Browse files Browse the repository at this point in the history
The Swift compiler can be run in "interpreter" mode, so it can run Swift "scripts" if they have a proper shebang and no file extension.
  • Loading branch information
frkd-dev committed Sep 5, 2024
1 parent 2308bc5 commit 5428b3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions runtime/syntax/swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ filetype: swift

detect:
filename: "\\.swift$"
header: "^#!.*bin/(env +)?swift( |$)"

rules:

Expand Down

0 comments on commit 5428b3f

Please sign in to comment.