-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Generics (ex: AnyPublisher), Closures, Computed variable,…
… Function return clause, Function body
- Loading branch information
Showing
18 changed files
with
1,075 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
BUILD_PATH=.build | ||
SWIFT_BUILD_FLAGS=--product CommandLineTool --configuration release --disable-sandbox --scratch-path ${BUILD_PATH} | ||
|
||
EXECUTABLE_X86_64=$(shell swift build ${SWIFT_BUILD_FLAGS} --arch x86_64 --show-bin-path)/CommandLineTool | ||
EXECUTABLE_ARM64=$(shell swift build ${SWIFT_BUILD_FLAGS} --arch arm64 --show-bin-path)/CommandLineTool | ||
EXECUTABLE=${BUILD_PATH}/CommandLineTool | ||
|
||
clean: | ||
@swift package clean | ||
|
||
build_x86_64: | ||
@swift build ${SWIFT_BUILD_FLAGS} --arch x86_64 | ||
|
||
build_arm64: | ||
@swift build ${SWIFT_BUILD_FLAGS} --arch arm64 | ||
|
||
build_release: clean build_x86_64 build_arm64 | ||
@lipo -create -output ${EXECUTABLE} ${EXECUTABLE_X86_64} ${EXECUTABLE_ARM64} | ||
@strip -rSTX ${EXECUTABLE} | ||
|
||
show_bin_path: | ||
@echo ${EXECUTABLE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import SwiftSyntax | ||
|
||
extension InitializerClauseSyntax { | ||
var hasDefaultValueWithSingleton: Bool { | ||
trimmedDescription.contains(".shared.") == true | ||
} | ||
} | ||
|
||
extension TokenSyntax { | ||
var isProtocol: Bool { | ||
self.text.isProtocolName | ||
} | ||
} | ||
|
||
extension TypeSyntax { | ||
var isProtocol: Bool { | ||
self.trimmedDescription.isProtocolName | ||
} | ||
} | ||
|
||
extension String { | ||
var isProtocolName: Bool { | ||
return Collector.protocols.contains(where: { | ||
$0.trimmedDescription == self | ||
}) | ||
} | ||
} |
Oops, something went wrong.