func parseGlobalName()

in Sources/SIL/SILParser.swift [508:518]


    func parseGlobalName() throws -> String {
        let start = position
        if skip("@") {
            // TODO(#14): Make name parsing more thorough.
            let name = take(while: { $0 == "$" || $0.isLetter || $0.isNumber || $0 == "_" })
            if !name.isEmpty {
                return name
            }
        }
        throw parseError("function name expected", at: start)
    }