Moved BindingGenerator from gen html project. It makes more sense here.
This commit is contained in:
22
Sources/BindingGenerator/Internal/Util.swift
Normal file
22
Sources/BindingGenerator/Internal/Util.swift
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Util.swift
|
||||
// HRW
|
||||
//
|
||||
// Created by Isaac Paul on 10/15/24.
|
||||
// Non-commercial license, see LICENSE.MD in the project root for details
|
||||
//
|
||||
|
||||
@inline(__always)
|
||||
internal func expect<T>(_ item:T?, _ error:String) throws -> T {
|
||||
if let item = item {
|
||||
return item
|
||||
}
|
||||
throw AppError(error)
|
||||
}
|
||||
/*
|
||||
internal func parseBool(_ item:String?) throws -> Bool? {
|
||||
if let item = item {
|
||||
return item
|
||||
}
|
||||
return nil
|
||||
}*/
|
||||
Reference in New Issue
Block a user