How to check Swift source code syntax

Via the command line:

swiftc -parse file.swift