From f8d7147e7467c07e2f90bb6487874656429799e7 Mon Sep 17 00:00:00 2001 From: David Jennes Date: Tue, 14 Feb 2017 15:07:57 +0100 Subject: [PATCH 1/3] ignore module for import, if it matches the current module --- templates/storyboards-default.stencil | 2 ++ templates/storyboards-lowercase.stencil | 2 ++ templates/storyboards-osx-default.stencil | 2 ++ templates/storyboards-osx-lowercase.stencil | 2 ++ templates/storyboards-swift3.stencil | 2 ++ templates/storyboards-uppercase.stencil | 2 ++ 6 files changed, 12 insertions(+) diff --git a/templates/storyboards-default.stencil b/templates/storyboards-default.stencil index 3bc0d88..efbd02e 100644 --- a/templates/storyboards-default.stencil +++ b/templates/storyboards-default.stencil @@ -4,7 +4,9 @@ import Foundation import UIKit {% for module in modules %} +{% if module != env.PRODUCT_MODULE_NAME and module != param.module %} import {{module}} +{% endif %} {% endfor %} {% if storyboards %} diff --git a/templates/storyboards-lowercase.stencil b/templates/storyboards-lowercase.stencil index 28c34b3..96ca6f3 100644 --- a/templates/storyboards-lowercase.stencil +++ b/templates/storyboards-lowercase.stencil @@ -4,7 +4,9 @@ import Foundation import UIKit {% for module in modules %} +{% if module != env.PRODUCT_MODULE_NAME and module != param.module %} import {{module}} +{% endif %} {% endfor %} {% if storyboards %} diff --git a/templates/storyboards-osx-default.stencil b/templates/storyboards-osx-default.stencil index a6a5fad..62de380 100644 --- a/templates/storyboards-osx-default.stencil +++ b/templates/storyboards-osx-default.stencil @@ -4,7 +4,9 @@ import Foundation import Cocoa {% for module in modules %} +{% if module != env.PRODUCT_MODULE_NAME and module != param.module %} import {{module}} +{% endif %} {% endfor %} {% if storyboards %} diff --git a/templates/storyboards-osx-lowercase.stencil b/templates/storyboards-osx-lowercase.stencil index 5cc58d8..2bdfdec 100644 --- a/templates/storyboards-osx-lowercase.stencil +++ b/templates/storyboards-osx-lowercase.stencil @@ -4,7 +4,9 @@ import Foundation import Cocoa {% for module in modules %} +{% if module != env.PRODUCT_MODULE_NAME and module != param.module %} import {{module}} +{% endif %} {% endfor %} {% if storyboards %} diff --git a/templates/storyboards-swift3.stencil b/templates/storyboards-swift3.stencil index 3a39c5a..f06a327 100644 --- a/templates/storyboards-swift3.stencil +++ b/templates/storyboards-swift3.stencil @@ -4,7 +4,9 @@ import Foundation import UIKit {% for module in modules %} +{% if module != env.PRODUCT_MODULE_NAME and module != param.module %} import {{module}} +{% endif %} {% endfor %} {% if storyboards %} diff --git a/templates/storyboards-uppercase.stencil b/templates/storyboards-uppercase.stencil index 3d5aeb6..2876a59 100644 --- a/templates/storyboards-uppercase.stencil +++ b/templates/storyboards-uppercase.stencil @@ -4,7 +4,9 @@ import Foundation import UIKit {% for module in modules %} +{% if module != env.PRODUCT_MODULE_NAME and module != param.module %} import {{module}} +{% endif %} {% endfor %} {% if storyboards %} From cef6c088bacae3a3851d69263de79be9d2709faf Mon Sep 17 00:00:00 2001 From: David Jennes Date: Wed, 15 Feb 2017 18:47:25 +0100 Subject: [PATCH 2/3] add context variation generation for ios --- .../default-context-all-ignore-module.swift | 184 ++++++++++++++++++ .../lowercase-context-all-ignore-module.swift | 184 ++++++++++++++++++ .../swift3-context-all-ignore-module.swift | 184 ++++++++++++++++++ .../uppercase-context-all-ignore-module.swift | 184 ++++++++++++++++++ Tests/TestSuites/StoryboardsiOSTests.swift | 38 +++- Tests/TestsHelper.swift | 22 ++- 6 files changed, 787 insertions(+), 9 deletions(-) create mode 100644 Tests/Expected/Storyboards-iOS/default-context-all-ignore-module.swift create mode 100644 Tests/Expected/Storyboards-iOS/lowercase-context-all-ignore-module.swift create mode 100644 Tests/Expected/Storyboards-iOS/swift3-context-all-ignore-module.swift create mode 100644 Tests/Expected/Storyboards-iOS/uppercase-context-all-ignore-module.swift diff --git a/Tests/Expected/Storyboards-iOS/default-context-all-ignore-module.swift b/Tests/Expected/Storyboards-iOS/default-context-all-ignore-module.swift new file mode 100644 index 0000000..513e05c --- /dev/null +++ b/Tests/Expected/Storyboards-iOS/default-context-all-ignore-module.swift @@ -0,0 +1,184 @@ +// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen + +import Foundation +import UIKit +import LocationPicker +import SlackTextViewController + +// swiftlint:disable file_length +// swiftlint:disable line_length +// swiftlint:disable type_body_length + +protocol StoryboardSceneType { + static var storyboardName: String { get } +} + +extension StoryboardSceneType { + static func storyboard() -> UIStoryboard { + return UIStoryboard(name: self.storyboardName, bundle: NSBundle(forClass: BundleToken.self)) + } + + static func initialViewController() -> UIViewController { + guard let vc = storyboard().instantiateInitialViewController() else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } +} + +extension StoryboardSceneType where Self: RawRepresentable, Self.RawValue == String { + func viewController() -> UIViewController { + return Self.storyboard().instantiateViewControllerWithIdentifier(self.rawValue) + } + static func viewController(identifier: Self) -> UIViewController { + return identifier.viewController() + } +} + +protocol StoryboardSegueType: RawRepresentable { } + +extension UIViewController { + func performSegue(segue: S, sender: AnyObject? = nil) { + performSegueWithIdentifier(segue.rawValue, sender: sender) + } +} + +enum StoryboardScene { + enum AdditionalImport: String, StoryboardSceneType { + static let storyboardName = "AdditionalImport" + + static func initialViewController() -> LocationPicker.LocationPickerViewController { + guard let vc = storyboard().instantiateInitialViewController() as? LocationPicker.LocationPickerViewController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + + case PublicScene = "public" + static func instantiatePublic() -> SlackTextViewController.SLKTextViewController { + guard let vc = StoryboardScene.AdditionalImport.PublicScene.viewController() as? SlackTextViewController.SLKTextViewController + else { + fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.") + } + return vc + } + } + enum Anonymous: StoryboardSceneType { + static let storyboardName = "Anonymous" + + static func initialViewController() -> UINavigationController { + guard let vc = storyboard().instantiateInitialViewController() as? UINavigationController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + } + enum Dependency: String, StoryboardSceneType { + static let storyboardName = "Dependency" + + case DependentScene = "Dependent" + static func instantiateDependent() -> UIViewController { + return StoryboardScene.Dependency.DependentScene.viewController() + } + } + enum Message: String, StoryboardSceneType { + static let storyboardName = "Message" + + case ComposerScene = "Composer" + static func instantiateComposer() -> UIViewController { + return StoryboardScene.Message.ComposerScene.viewController() + } + + case MessagesListScene = "MessagesList" + static func instantiateMessagesList() -> UITableViewController { + guard let vc = StoryboardScene.Message.MessagesListScene.viewController() as? UITableViewController + else { + fatalError("ViewController 'MessagesList' is not of the expected class UITableViewController.") + } + return vc + } + + case NavCtrlScene = "NavCtrl" + static func instantiateNavCtrl() -> UINavigationController { + guard let vc = StoryboardScene.Message.NavCtrlScene.viewController() as? UINavigationController + else { + fatalError("ViewController 'NavCtrl' is not of the expected class UINavigationController.") + } + return vc + } + + case URLChooserScene = "URLChooser" + static func instantiateURLChooser() -> XXPickerViewController { + guard let vc = StoryboardScene.Message.URLChooserScene.viewController() as? XXPickerViewController + else { + fatalError("ViewController 'URLChooser' is not of the expected class XXPickerViewController.") + } + return vc + } + } + enum Placeholder: String, StoryboardSceneType { + static let storyboardName = "Placeholder" + + case NavigationScene = "Navigation" + static func instantiateNavigation() -> UINavigationController { + guard let vc = StoryboardScene.Placeholder.NavigationScene.viewController() as? UINavigationController + else { + fatalError("ViewController 'Navigation' is not of the expected class UINavigationController.") + } + return vc + } + } + enum Wizard: String, StoryboardSceneType { + static let storyboardName = "Wizard" + + static func initialViewController() -> CreateAccViewController { + guard let vc = storyboard().instantiateInitialViewController() as? CreateAccViewController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + + case Accept_CGUScene = "Accept-CGU" + static func instantiateAcceptCGU() -> UIViewController { + return StoryboardScene.Wizard.Accept_CGUScene.viewController() + } + + case CreateAccountScene = "CreateAccount" + static func instantiateCreateAccount() -> CreateAccViewController { + guard let vc = StoryboardScene.Wizard.CreateAccountScene.viewController() as? CreateAccViewController + else { + fatalError("ViewController 'CreateAccount' is not of the expected class CreateAccViewController.") + } + return vc + } + + case PreferencesScene = "Preferences" + static func instantiatePreferences() -> UITableViewController { + guard let vc = StoryboardScene.Wizard.PreferencesScene.viewController() as? UITableViewController + else { + fatalError("ViewController 'Preferences' is not of the expected class UITableViewController.") + } + return vc + } + + case Validate_PasswordScene = "Validate_Password" + static func instantiateValidatePassword() -> UIViewController { + return StoryboardScene.Wizard.Validate_PasswordScene.viewController() + } + } +} + +enum StoryboardSegue { + enum AdditionalImport: String, StoryboardSegueType { + case Private = "private" + } + enum Message: String, StoryboardSegueType { + case CustomBack + case Embed + case NonCustom + case Show_NavCtrl = "Show-NavCtrl" + } + enum Wizard: String, StoryboardSegueType { + case ShowPassword + } +} diff --git a/Tests/Expected/Storyboards-iOS/lowercase-context-all-ignore-module.swift b/Tests/Expected/Storyboards-iOS/lowercase-context-all-ignore-module.swift new file mode 100644 index 0000000..74f7edb --- /dev/null +++ b/Tests/Expected/Storyboards-iOS/lowercase-context-all-ignore-module.swift @@ -0,0 +1,184 @@ +// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen + +import Foundation +import UIKit +import LocationPicker +import SlackTextViewController + +// swiftlint:disable file_length +// swiftlint:disable line_length +// swiftlint:disable type_body_length + +protocol StoryboardSceneType { + static var storyboardName: String { get } +} + +extension StoryboardSceneType { + static func storyboard() -> UIStoryboard { + return UIStoryboard(name: self.storyboardName, bundle: NSBundle(forClass: BundleToken.self)) + } + + static func initialViewController() -> UIViewController { + guard let vc = storyboard().instantiateInitialViewController() else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } +} + +extension StoryboardSceneType where Self: RawRepresentable, Self.RawValue == String { + func viewController() -> UIViewController { + return Self.storyboard().instantiateViewControllerWithIdentifier(self.rawValue) + } + static func viewController(identifier: Self) -> UIViewController { + return identifier.viewController() + } +} + +protocol StoryboardSegueType: RawRepresentable { } + +extension UIViewController { + func performSegue(segue: S, sender: AnyObject? = nil) { + performSegueWithIdentifier(segue.rawValue, sender: sender) + } +} + +enum StoryboardScene { + enum AdditionalImport: String, StoryboardSceneType { + static let storyboardName = "AdditionalImport" + + static func initialViewController() -> LocationPicker.LocationPickerViewController { + guard let vc = storyboard().instantiateInitialViewController() as? LocationPicker.LocationPickerViewController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + + case `public` + static func publicViewController() -> SlackTextViewController.SLKTextViewController { + guard let vc = StoryboardScene.AdditionalImport.`public`.viewController() as? SlackTextViewController.SLKTextViewController + else { + fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.") + } + return vc + } + } + enum Anonymous: StoryboardSceneType { + static let storyboardName = "Anonymous" + + static func initialViewController() -> UINavigationController { + guard let vc = storyboard().instantiateInitialViewController() as? UINavigationController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + } + enum Dependency: String, StoryboardSceneType { + static let storyboardName = "Dependency" + + case dependent = "Dependent" + static func dependentViewController() -> UIViewController { + return StoryboardScene.Dependency.dependent.viewController() + } + } + enum Message: String, StoryboardSceneType { + static let storyboardName = "Message" + + case composer = "Composer" + static func composerViewController() -> UIViewController { + return StoryboardScene.Message.composer.viewController() + } + + case messagesList = "MessagesList" + static func messagesListViewController() -> UITableViewController { + guard let vc = StoryboardScene.Message.messagesList.viewController() as? UITableViewController + else { + fatalError("ViewController 'MessagesList' is not of the expected class UITableViewController.") + } + return vc + } + + case navCtrl = "NavCtrl" + static func navCtrlViewController() -> UINavigationController { + guard let vc = StoryboardScene.Message.navCtrl.viewController() as? UINavigationController + else { + fatalError("ViewController 'NavCtrl' is not of the expected class UINavigationController.") + } + return vc + } + + case urlChooser = "URLChooser" + static func urlChooserViewController() -> XXPickerViewController { + guard let vc = StoryboardScene.Message.urlChooser.viewController() as? XXPickerViewController + else { + fatalError("ViewController 'URLChooser' is not of the expected class XXPickerViewController.") + } + return vc + } + } + enum Placeholder: String, StoryboardSceneType { + static let storyboardName = "Placeholder" + + case navigation = "Navigation" + static func navigationViewController() -> UINavigationController { + guard let vc = StoryboardScene.Placeholder.navigation.viewController() as? UINavigationController + else { + fatalError("ViewController 'Navigation' is not of the expected class UINavigationController.") + } + return vc + } + } + enum Wizard: String, StoryboardSceneType { + static let storyboardName = "Wizard" + + static func initialViewController() -> CreateAccViewController { + guard let vc = storyboard().instantiateInitialViewController() as? CreateAccViewController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + + case accept_CGU = "Accept-CGU" + static func accept_CGUViewController() -> UIViewController { + return StoryboardScene.Wizard.accept_CGU.viewController() + } + + case createAccount = "CreateAccount" + static func createAccountViewController() -> CreateAccViewController { + guard let vc = StoryboardScene.Wizard.createAccount.viewController() as? CreateAccViewController + else { + fatalError("ViewController 'CreateAccount' is not of the expected class CreateAccViewController.") + } + return vc + } + + case preferences = "Preferences" + static func preferencesViewController() -> UITableViewController { + guard let vc = StoryboardScene.Wizard.preferences.viewController() as? UITableViewController + else { + fatalError("ViewController 'Preferences' is not of the expected class UITableViewController.") + } + return vc + } + + case validate_Password = "Validate_Password" + static func validate_PasswordViewController() -> UIViewController { + return StoryboardScene.Wizard.validate_Password.viewController() + } + } +} + +enum StoryboardSegue { + enum AdditionalImport: String, StoryboardSegueType { + case Private = "private" + } + enum Message: String, StoryboardSegueType { + case CustomBack + case Embed + case NonCustom + case Show_NavCtrl = "Show-NavCtrl" + } + enum Wizard: String, StoryboardSegueType { + case ShowPassword + } +} diff --git a/Tests/Expected/Storyboards-iOS/swift3-context-all-ignore-module.swift b/Tests/Expected/Storyboards-iOS/swift3-context-all-ignore-module.swift new file mode 100644 index 0000000..3394f37 --- /dev/null +++ b/Tests/Expected/Storyboards-iOS/swift3-context-all-ignore-module.swift @@ -0,0 +1,184 @@ +// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen + +import Foundation +import UIKit +import LocationPicker +import SlackTextViewController + +// swiftlint:disable file_length +// swiftlint:disable line_length +// swiftlint:disable type_body_length + +protocol StoryboardSceneType { + static var storyboardName: String { get } +} + +extension StoryboardSceneType { + static func storyboard() -> UIStoryboard { + return UIStoryboard(name: self.storyboardName, bundle: Bundle(for: BundleToken.self)) + } + + static func initialViewController() -> UIViewController { + guard let vc = storyboard().instantiateInitialViewController() else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } +} + +extension StoryboardSceneType where Self: RawRepresentable, Self.RawValue == String { + func viewController() -> UIViewController { + return Self.storyboard().instantiateViewController(withIdentifier: self.rawValue) + } + static func viewController(identifier: Self) -> UIViewController { + return identifier.viewController() + } +} + +protocol StoryboardSegueType: RawRepresentable { } + +extension UIViewController { + func perform(segue: S, sender: Any? = nil) where S.RawValue == String { + performSegue(withIdentifier: segue.rawValue, sender: sender) + } +} + +enum StoryboardScene { + enum AdditionalImport: String, StoryboardSceneType { + static let storyboardName = "AdditionalImport" + + static func initialViewController() -> LocationPicker.LocationPickerViewController { + guard let vc = storyboard().instantiateInitialViewController() as? LocationPicker.LocationPickerViewController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + + case publicScene = "public" + static func instantiatePublic() -> SlackTextViewController.SLKTextViewController { + guard let vc = StoryboardScene.AdditionalImport.publicScene.viewController() as? SlackTextViewController.SLKTextViewController + else { + fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.") + } + return vc + } + } + enum Anonymous: StoryboardSceneType { + static let storyboardName = "Anonymous" + + static func initialViewController() -> UINavigationController { + guard let vc = storyboard().instantiateInitialViewController() as? UINavigationController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + } + enum Dependency: String, StoryboardSceneType { + static let storyboardName = "Dependency" + + case dependentScene = "Dependent" + static func instantiateDependent() -> UIViewController { + return StoryboardScene.Dependency.dependentScene.viewController() + } + } + enum Message: String, StoryboardSceneType { + static let storyboardName = "Message" + + case composerScene = "Composer" + static func instantiateComposer() -> UIViewController { + return StoryboardScene.Message.composerScene.viewController() + } + + case messagesListScene = "MessagesList" + static func instantiateMessagesList() -> UITableViewController { + guard let vc = StoryboardScene.Message.messagesListScene.viewController() as? UITableViewController + else { + fatalError("ViewController 'MessagesList' is not of the expected class UITableViewController.") + } + return vc + } + + case navCtrlScene = "NavCtrl" + static func instantiateNavCtrl() -> UINavigationController { + guard let vc = StoryboardScene.Message.navCtrlScene.viewController() as? UINavigationController + else { + fatalError("ViewController 'NavCtrl' is not of the expected class UINavigationController.") + } + return vc + } + + case urlChooserScene = "URLChooser" + static func instantiateUrlChooser() -> XXPickerViewController { + guard let vc = StoryboardScene.Message.urlChooserScene.viewController() as? XXPickerViewController + else { + fatalError("ViewController 'URLChooser' is not of the expected class XXPickerViewController.") + } + return vc + } + } + enum Placeholder: String, StoryboardSceneType { + static let storyboardName = "Placeholder" + + case navigationScene = "Navigation" + static func instantiateNavigation() -> UINavigationController { + guard let vc = StoryboardScene.Placeholder.navigationScene.viewController() as? UINavigationController + else { + fatalError("ViewController 'Navigation' is not of the expected class UINavigationController.") + } + return vc + } + } + enum Wizard: String, StoryboardSceneType { + static let storyboardName = "Wizard" + + static func initialViewController() -> CreateAccViewController { + guard let vc = storyboard().instantiateInitialViewController() as? CreateAccViewController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + + case acceptCGUScene = "Accept-CGU" + static func instantiateAcceptCGU() -> UIViewController { + return StoryboardScene.Wizard.acceptCGUScene.viewController() + } + + case createAccountScene = "CreateAccount" + static func instantiateCreateAccount() -> CreateAccViewController { + guard let vc = StoryboardScene.Wizard.createAccountScene.viewController() as? CreateAccViewController + else { + fatalError("ViewController 'CreateAccount' is not of the expected class CreateAccViewController.") + } + return vc + } + + case preferencesScene = "Preferences" + static func instantiatePreferences() -> UITableViewController { + guard let vc = StoryboardScene.Wizard.preferencesScene.viewController() as? UITableViewController + else { + fatalError("ViewController 'Preferences' is not of the expected class UITableViewController.") + } + return vc + } + + case validatePasswordScene = "Validate_Password" + static func instantiateValidatePassword() -> UIViewController { + return StoryboardScene.Wizard.validatePasswordScene.viewController() + } + } +} + +enum StoryboardSegue { + enum AdditionalImport: String, StoryboardSegueType { + case `private` + } + enum Message: String, StoryboardSegueType { + case customBack = "CustomBack" + case embed = "Embed" + case nonCustom = "NonCustom" + case showNavCtrl = "Show-NavCtrl" + } + enum Wizard: String, StoryboardSegueType { + case showPassword = "ShowPassword" + } +} diff --git a/Tests/Expected/Storyboards-iOS/uppercase-context-all-ignore-module.swift b/Tests/Expected/Storyboards-iOS/uppercase-context-all-ignore-module.swift new file mode 100644 index 0000000..30b9158 --- /dev/null +++ b/Tests/Expected/Storyboards-iOS/uppercase-context-all-ignore-module.swift @@ -0,0 +1,184 @@ +// Generated using SwiftGen, by O.Halligon — https://github.com/AliSoftware/SwiftGen + +import Foundation +import UIKit +import LocationPicker +import SlackTextViewController + +// swiftlint:disable file_length +// swiftlint:disable line_length +// swiftlint:disable type_body_length + +protocol StoryboardSceneType { + static var storyboardName: String { get } +} + +extension StoryboardSceneType { + static func storyboard() -> UIStoryboard { + return UIStoryboard(name: self.storyboardName, bundle: NSBundle(forClass: BundleToken.self)) + } + + static func initialViewController() -> UIViewController { + guard let vc = storyboard().instantiateInitialViewController() else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } +} + +extension StoryboardSceneType where Self: RawRepresentable, Self.RawValue == String { + func viewController() -> UIViewController { + return Self.storyboard().instantiateViewControllerWithIdentifier(self.rawValue) + } + static func viewController(identifier: Self) -> UIViewController { + return identifier.viewController() + } +} + +protocol StoryboardSegueType: RawRepresentable { } + +extension UIViewController { + func performSegue(segue: S, sender: AnyObject? = nil) { + performSegueWithIdentifier(segue.rawValue, sender: sender) + } +} + +enum StoryboardScene { + enum AdditionalImport: String, StoryboardSceneType { + static let storyboardName = "AdditionalImport" + + static func initialViewController() -> LocationPicker.LocationPickerViewController { + guard let vc = storyboard().instantiateInitialViewController() as? LocationPicker.LocationPickerViewController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + + case Public = "public" + static func publicViewController() -> SlackTextViewController.SLKTextViewController { + guard let vc = StoryboardScene.AdditionalImport.Public.viewController() as? SlackTextViewController.SLKTextViewController + else { + fatalError("ViewController 'public' is not of the expected class SlackTextViewController.SLKTextViewController.") + } + return vc + } + } + enum Anonymous: StoryboardSceneType { + static let storyboardName = "Anonymous" + + static func initialViewController() -> UINavigationController { + guard let vc = storyboard().instantiateInitialViewController() as? UINavigationController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + } + enum Dependency: String, StoryboardSceneType { + static let storyboardName = "Dependency" + + case Dependent + static func dependentViewController() -> UIViewController { + return StoryboardScene.Dependency.Dependent.viewController() + } + } + enum Message: String, StoryboardSceneType { + static let storyboardName = "Message" + + case Composer + static func composerViewController() -> UIViewController { + return StoryboardScene.Message.Composer.viewController() + } + + case MessagesList + static func messagesListViewController() -> UITableViewController { + guard let vc = StoryboardScene.Message.MessagesList.viewController() as? UITableViewController + else { + fatalError("ViewController 'MessagesList' is not of the expected class UITableViewController.") + } + return vc + } + + case NavCtrl + static func navCtrlViewController() -> UINavigationController { + guard let vc = StoryboardScene.Message.NavCtrl.viewController() as? UINavigationController + else { + fatalError("ViewController 'NavCtrl' is not of the expected class UINavigationController.") + } + return vc + } + + case URLChooser + static func urlChooserViewController() -> XXPickerViewController { + guard let vc = StoryboardScene.Message.URLChooser.viewController() as? XXPickerViewController + else { + fatalError("ViewController 'URLChooser' is not of the expected class XXPickerViewController.") + } + return vc + } + } + enum Placeholder: String, StoryboardSceneType { + static let storyboardName = "Placeholder" + + case Navigation + static func navigationViewController() -> UINavigationController { + guard let vc = StoryboardScene.Placeholder.Navigation.viewController() as? UINavigationController + else { + fatalError("ViewController 'Navigation' is not of the expected class UINavigationController.") + } + return vc + } + } + enum Wizard: String, StoryboardSceneType { + static let storyboardName = "Wizard" + + static func initialViewController() -> CreateAccViewController { + guard let vc = storyboard().instantiateInitialViewController() as? CreateAccViewController else { + fatalError("Failed to instantiate initialViewController for \(self.storyboardName)") + } + return vc + } + + case Accept_CGU = "Accept-CGU" + static func acceptCGUViewController() -> UIViewController { + return StoryboardScene.Wizard.Accept_CGU.viewController() + } + + case CreateAccount + static func createAccountViewController() -> CreateAccViewController { + guard let vc = StoryboardScene.Wizard.CreateAccount.viewController() as? CreateAccViewController + else { + fatalError("ViewController 'CreateAccount' is not of the expected class CreateAccViewController.") + } + return vc + } + + case Preferences + static func preferencesViewController() -> UITableViewController { + guard let vc = StoryboardScene.Wizard.Preferences.viewController() as? UITableViewController + else { + fatalError("ViewController 'Preferences' is not of the expected class UITableViewController.") + } + return vc + } + + case Validate_Password + static func validatePasswordViewController() -> UIViewController { + return StoryboardScene.Wizard.Validate_Password.viewController() + } + } +} + +enum StoryboardSegue { + enum AdditionalImport: String, StoryboardSegueType { + case Private = "private" + } + enum Message: String, StoryboardSegueType { + case CustomBack + case Embed + case NonCustom + case Show_NavCtrl = "Show-NavCtrl" + } + enum Wizard: String, StoryboardSegueType { + case ShowPassword + } +} diff --git a/Tests/TestSuites/StoryboardsiOSTests.swift b/Tests/TestSuites/StoryboardsiOSTests.swift index d200ab3..6f6e279 100644 --- a/Tests/TestSuites/StoryboardsiOSTests.swift +++ b/Tests/TestSuites/StoryboardsiOSTests.swift @@ -10,32 +10,62 @@ class StoryboardsiOSTests: XCTestCase { enum Contexts { static let all = ["empty", "all", "customname"] } + + // generate variations to test target module matching + static let variations: VariationGenerator = { name, context in + guard name == "all" else { return [(context: context, suffix: "")] } + + return [ + (context: context, suffix: ""), + (context: enrich(context, env: ["PRODUCT_MODULE_NAME": "Test"]), suffix: ""), + (context: enrich(context, env: ["PRODUCT_MODULE_NAME": "CustomSegue"]), suffix: "-ignore-module"), + (context: enrich(context, param: ["module": "Test"]), suffix: ""), + (context: enrich(context, param: ["module": "CustomSegue"]), suffix: "-ignore-module") + ] + } func testDefault() { test(template: "storyboards-default", contextNames: Contexts.all, outputPrefix: "default", - directory: .storyboardsiOS) + directory: .storyboardsiOS, + contextVariations: StoryboardsiOSTests.variations) } func testSwift3() { test(template: "storyboards-swift3", contextNames: Contexts.all, outputPrefix: "swift3", - directory: .storyboardsiOS) + directory: .storyboardsiOS, + contextVariations: StoryboardsiOSTests.variations) } func testLowercase() { test(template: "storyboards-lowercase", contextNames: Contexts.all, outputPrefix: "lowercase", - directory: .storyboardsiOS) + directory: .storyboardsiOS, + contextVariations: StoryboardsiOSTests.variations) } func testUppercase() { test(template: "storyboards-uppercase", contextNames: Contexts.all, outputPrefix: "uppercase", - directory: .storyboardsiOS) + directory: .storyboardsiOS, + contextVariations: StoryboardsiOSTests.variations) + } + + private static func enrich(_ context: [String: Any], env: [String: Any]? = nil, param: [String: Any]? = nil) -> [String: Any] { + var result = context + + if let env = env { + result["env"] = env + } + if let param = param { + result["param"] = param + } + + return result } } diff --git a/Tests/TestsHelper.swift b/Tests/TestsHelper.swift index cdb3a7e..33ec44f 100644 --- a/Tests/TestsHelper.swift +++ b/Tests/TestsHelper.swift @@ -115,6 +115,15 @@ class Fixtures { } extension XCTestCase { + /** + Generate variations of a context. + + - Parameter name: The name of the context + - Parameter context: The context itself + - Return: a tuple with a list of generated contexts, and a suffix to find the correct output file + */ + typealias VariationGenerator = ((String, [String: Any]) -> [(context: [String: Any], suffix: String)]) + /** Test the given template against a list of contexts, comparing the output with files in the expected folder. @@ -122,19 +131,22 @@ extension XCTestCase { - Parameter contextNames: A list of context names (without the `plist` extension) - Parameter outputPrefix: Prefix for the output files, becomes "{outputPrefix}-context-{contextName}.swift" - Parameter directory: The directory to look for files in (correspons to de command) + - Parameter contextVariations: Optional closure to generate context variations. */ - func test(template templateName: String, contextNames: [String], outputPrefix: String, directory: Fixtures.Directory) { + func test(template templateName: String, contextNames: [String], outputPrefix: String, directory: Fixtures.Directory, contextVariations: VariationGenerator? = nil) { let template = SwiftTemplate(templateString: Fixtures.template(for: "\(templateName).stencil"), environment: stencilSwiftEnvironment()) + let contextVariations = contextVariations ?? { [(context: $1, suffix: "")] } for contextName in contextNames { print("Testing context '\(contextName)'...") - let context = Fixtures.context(for: "\(contextName).plist", sub: directory) - let result = try! template.render(context) - let expected = Fixtures.output(for: "\(outputPrefix)-context-\(contextName).swift", sub: directory) - XCTDiffStrings(result, expected) + for (context, suffix) in contextVariations(contextName, context) { + let result = try! template.render(context) + let expected = Fixtures.output(for: "\(outputPrefix)-context-\(contextName)\(suffix).swift", sub: directory) + XCTDiffStrings(result, expected) + } } } } From 498d415e33d02c6c906b33ce4c130abaaaf7e2c5 Mon Sep 17 00:00:00 2001 From: David Jennes Date: Thu, 16 Feb 2017 10:05:54 +0100 Subject: [PATCH 3/3] update to latest stencilswiftkit and use `enrich` method from kit --- Tests/Podfile.lock | 4 +- Tests/Pods/Manifest.lock | 4 +- Tests/Pods/Pods.xcodeproj/project.pbxproj | 378 +++++++++--------- Tests/Pods/StencilSwiftKit/README.md | 40 +- .../StencilSwiftKit/Sources/CallNode.swift | 12 +- .../StencilSwiftKit/Sources/Context.swift | 30 ++ .../StencilSwiftKit/Sources/Environment.swift | 32 ++ .../StencilSwiftKit/Sources/Filters.swift | 1 + .../StencilSwiftKit/Sources/Parameters.swift | 80 ++++ .../StencilSwiftKit/Sources/SetNode.swift | 4 +- ...plate.swift => StencilSwiftTemplate.swift} | 30 +- Tests/TestSuites/StoryboardsiOSTests.swift | 47 ++- Tests/TestsHelper.swift | 4 +- 13 files changed, 417 insertions(+), 249 deletions(-) create mode 100644 Tests/Pods/StencilSwiftKit/Sources/Context.swift create mode 100644 Tests/Pods/StencilSwiftKit/Sources/Environment.swift create mode 100644 Tests/Pods/StencilSwiftKit/Sources/Parameters.swift rename Tests/Pods/StencilSwiftKit/Sources/{SwiftTemplate.swift => StencilSwiftTemplate.swift} (52%) diff --git a/Tests/Podfile.lock b/Tests/Podfile.lock index 1d0fb80..63a690a 100644 --- a/Tests/Podfile.lock +++ b/Tests/Podfile.lock @@ -20,7 +20,7 @@ CHECKOUT OPTIONS: :commit: 99efba56e942270780a452e5dcdfa1a839839cf4 :git: https://github.com/kylef/Stencil StencilSwiftKit: - :commit: 59efee95ce9514e45b2bc6f5b78d3bdffb273a78 + :commit: cc3c4d9aed593c7026e8d18c7d7d75628039a330 :git: https://github.com/SwiftGen/StencilSwiftKit SPEC CHECKSUMS: @@ -30,4 +30,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: af694ce70d27109bd28ecfb95a4370560e111f3a -COCOAPODS: 1.2.0.beta.3 +COCOAPODS: 1.2.0 diff --git a/Tests/Pods/Manifest.lock b/Tests/Pods/Manifest.lock index 1d0fb80..63a690a 100644 --- a/Tests/Pods/Manifest.lock +++ b/Tests/Pods/Manifest.lock @@ -20,7 +20,7 @@ CHECKOUT OPTIONS: :commit: 99efba56e942270780a452e5dcdfa1a839839cf4 :git: https://github.com/kylef/Stencil StencilSwiftKit: - :commit: 59efee95ce9514e45b2bc6f5b78d3bdffb273a78 + :commit: cc3c4d9aed593c7026e8d18c7d7d75628039a330 :git: https://github.com/SwiftGen/StencilSwiftKit SPEC CHECKSUMS: @@ -30,4 +30,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: af694ce70d27109bd28ecfb95a4370560e111f3a -COCOAPODS: 1.2.0.beta.3 +COCOAPODS: 1.2.0 diff --git a/Tests/Pods/Pods.xcodeproj/project.pbxproj b/Tests/Pods/Pods.xcodeproj/project.pbxproj index 53187d1..b45a3d4 100644 --- a/Tests/Pods/Pods.xcodeproj/project.pbxproj +++ b/Tests/Pods/Pods.xcodeproj/project.pbxproj @@ -3,51 +3,54 @@ archiveVersion = 1; classes = { }; - objectVersion = 47; + objectVersion = 48; objects = { /* Begin PBXBuildFile section */ - 01847138AFF06C90E0177A57D59FDACE /* Tokenizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66F7B6885A87B4DD3DF9C1F0233F316D /* Tokenizer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 040B29D0120B5B450B98FC67FEC958B8 /* PathKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E33B1DD7582AEBF9CBCC1869BCB7D3A /* PathKit-dummy.m */; }; + 01847138AFF06C90E0177A57D59FDACE /* Tokenizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A5426BCBC806A6AA5A780F481547038 /* Tokenizer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 021F29432B3F85185827E0DC0EE78A79 /* SetNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E05110303F4EF1BF79FA0724CF3E313 /* SetNode.swift */; }; + 02E67E3FB7991FA56E20E9E5C1B81DAF /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91BE2C76E74E5F180983F9BCC1A5B853 /* Context.swift */; }; + 040B29D0120B5B450B98FC67FEC958B8 /* PathKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D6847DF518406FCD4CEC725678C4597 /* PathKit-dummy.m */; }; 089D6407EB1EEFC90043E9E54AD49B20 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2497E0C37C035DB8276C0C7335E3FC93 /* Cocoa.framework */; }; 0E41E483B26C85AAE00EA78880A1C3E0 /* PathKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0436538F42B0A2EC1C972F8EE47937E0 /* PathKit.framework */; }; - 1B8805B5D9190640247C00EA9F0BF08C /* NowTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = A18F5E36F57570A1D1EECAFE6FB9BD26 /* NowTag.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 1BA59F29AB7F02089F55CE5EBE581F8B /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = D13D0FEC08671617A97C0BAE39794371 /* Context.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 2367547A833F83B3F00364A5C221511D /* Filters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A606AF7935ABEBAAF9C9C03E70CDC5A /* Filters.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 13E86D0ADB461206F01308E1EFD320AF /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = A694DB2B01D4A14951921483F1CB241C /* Environment.swift */; }; + 1B8805B5D9190640247C00EA9F0BF08C /* NowTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7A4E42719B41FC4AEE5433DE3AEB11 /* NowTag.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 1BA59F29AB7F02089F55CE5EBE581F8B /* Context.swift in Sources */ = {isa = PBXBuildFile; fileRef = 471B08603492AF191E6851BD2FF8B2E5 /* Context.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2367547A833F83B3F00364A5C221511D /* Filters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CF4A8520C1218AF67900E6530CD3697 /* Filters.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 250F7C700371BFFB425A64130DD9C5E3 /* StencilSwiftKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 98FDFB829DE6394E7130B68A57716A8E /* StencilSwiftKit-dummy.m */; }; 2636E7A890C8E29D410238FE1578E827 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 11F7F2E3F010D24453E40821938EF8EC /* Foundation.framework */; }; - 3378EE87DA9FB9454669D5D5191B4E98 /* StencilSwiftKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FF51E54F26A48E7403325D14C074BF4 /* StencilSwiftKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 339CE7D9844A652B598A9605B0E301BA /* Filters.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3332B5B3D33D1710C37F9396E27FB9E /* Filters.swift */; }; - 36AAACDBFB8ECDCEA1C35A1CC99C9F10 /* Template.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1A35ADDA9CE72FC8447E7145AA92019 /* Template.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 44EF07BD6018CDDF4D5A72BFA3AF9F55 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D45480978A5D67188FD75399701D3E6 /* Expression.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4ACCD085F0FCBDF0A90C9ED77A61EDE9 /* Loader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37E2458E14EB1D717659E882410C1505 /* Loader.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 5245ABB6A66FF1DEC56583EF468DD7AA /* PathKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E55C2675F7618F278BDEAA8A20739C3D /* PathKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 534EE7637DF65587E0B80E5E51CBB611 /* Inheritence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54C60730CDF8E1C02BF5CCAB3F09A4E3 /* Inheritence.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 543424E82FEF86C96E322ED8658FC188 /* Stencil-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = AE5450BF320BAA3C59F1670924C2CE39 /* Stencil-dummy.m */; }; - 5915DB3660AA759BDD4F2302B9A999DE /* FilterTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56B09F20715FDF89822A1EC75F6B94B4 /* FilterTag.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6272EE69D3F5DE1DF030E2B979A19909 /* PathKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 339A395A41387ECDC2D106FA04A1F34F /* PathKit.swift */; }; + 3378EE87DA9FB9454669D5D5191B4E98 /* StencilSwiftKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 17DC3F7FE727780247B8744142177850 /* StencilSwiftKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 36AAACDBFB8ECDCEA1C35A1CC99C9F10 /* Template.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DB7555160DBE01F8C52C2892AD26758 /* Template.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 44EF07BD6018CDDF4D5A72BFA3AF9F55 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27A349896F439030FE75876323217C42 /* Expression.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 4ACCD085F0FCBDF0A90C9ED77A61EDE9 /* Loader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B5A7D3492E3188BAA219C2BF03DB7B8 /* Loader.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 5245ABB6A66FF1DEC56583EF468DD7AA /* PathKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 748DB2173F65D116A3202AB0A7476254 /* PathKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 534EE7637DF65587E0B80E5E51CBB611 /* Inheritence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E55ED20B9E30F6749CA776677DCA9B /* Inheritence.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 543424E82FEF86C96E322ED8658FC188 /* Stencil-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 78186B4F98B6CEEF9AE97498910C521D /* Stencil-dummy.m */; }; + 5915DB3660AA759BDD4F2302B9A999DE /* FilterTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEED6A59ADC5619FC1240A666BC33443 /* FilterTag.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 5D9AB8DFA4D1BD052E1AC638A0AE5D5C /* SwiftIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E17942CE2E3EE78D5CC65495C2CC185 /* SwiftIdentifier.swift */; }; + 5F609800FB1EE08F96356C6D83C0CA4A /* Parameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FCD0E5F85AD68FC2B5C5C2027C53A20 /* Parameters.swift */; }; + 6091F58F99C5B40FB02A521CEC1FA0DA /* Filters.swift in Sources */ = {isa = PBXBuildFile; fileRef = E85D395ECDAA60C839C5449D4A186461 /* Filters.swift */; }; + 6272EE69D3F5DE1DF030E2B979A19909 /* PathKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D886E4A562B553F03DE132BF1ED7B57 /* PathKit.swift */; }; 77D8C016692C6E24EBEDF607455B0B0E /* PathKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0436538F42B0A2EC1C972F8EE47937E0 /* PathKit.framework */; }; 7C1C25A317F91E37571D91804306D261 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2497E0C37C035DB8276C0C7335E3FC93 /* Cocoa.framework */; }; - 7CB50BD154619CA63F52131C2BDBD2C5 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 119C58B0F90BFCF564EAE12CA39D69CD /* Errors.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 805399F5611AF8E49BB0AEE1D3517FD8 /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01DBD5FA8BF9736F379972E358B0B2C /* Environment.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7CB50BD154619CA63F52131C2BDBD2C5 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9D611326DAC860803131BD5BB5E59B08 /* Errors.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 805399F5611AF8E49BB0AEE1D3517FD8 /* Environment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D4F053F5586CE716E54A30343AA0613 /* Environment.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 82671E88F0AC858A867928AB0088BBFC /* Stencil.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A68FA9661EC6B4BA5415DDD474F7F00 /* Stencil.framework */; }; - 85A2AC8B20BDBDF40654856FD965354B /* SwiftTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE6DCD2E80A477ACC5B6B8DE9A6C3FEE /* SwiftTemplate.swift */; }; 874B546A75EE513B966CCE41CBBA6AD7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2497E0C37C035DB8276C0C7335E3FC93 /* Cocoa.framework */; }; - 885DE8DB15D3EA1BA82F5A13E807916E /* Stencil-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 303702374300CDC6D24181997E45C550 /* Stencil-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8FA5114518281D3F199FBC0E7C026DAA /* Node.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B14DCF7FD2687174EAA39FED6851BA5 /* Node.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 97E9BD613CA56D3A5D619D1CF68F5F97 /* StencilSwiftKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EF5B091B960F320BC6EDD221B78605F7 /* StencilSwiftKit-dummy.m */; }; + 885DE8DB15D3EA1BA82F5A13E807916E /* Stencil-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 19687C80B4D33105F8B0A50D7905E033 /* Stencil-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 89B6E9CA52E2FB8E6FAC9F25F19C85BA /* CallNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB343D6C2B388F60FB9FE3B4D88AF032 /* CallNode.swift */; }; + 8FA5114518281D3F199FBC0E7C026DAA /* Node.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17EFAD74A7DA63D24C13B9C608B8D586 /* Node.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 9BC80B3F2EE018C2BB483457AA07ACFF /* Pods-Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 52E08CA96B2F20724148FF5361AD7206 /* Pods-Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9E557C62C7C6D8FAF19396B45EDDFD31 /* Variable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 852AB7C7B5C756E8AFB1188F3F2DD2D6 /* Variable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 9E557C62C7C6D8FAF19396B45EDDFD31 /* Variable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87B03929355C96691F74E139BF7F86F2 /* Variable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; A2B9882F7B61B783116C9FF9147D4C05 /* Pods-Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C0ABA9994C05CE2F400945671B7038BA /* Pods-Tests-dummy.m */; }; - AE16D25DF5043F36FFA85103463D7ADE /* CallNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B93CE6C969FE0F70FEAD7EE89F3667 /* CallNode.swift */; }; - B65CC4D6EE2210495A18E7695A3E6DC5 /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 532F45E9240974FF0E060BAF83490D44 /* Extension.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - BAFB41FE6819D8068BD91DF6A8E88E34 /* SetNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = DCCE252CCAFC1D1EA7E2AB7B272B9C2F /* SetNode.swift */; }; - C22E1920B40D3E75EE6C1B253A0B3E91 /* IfTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85382037057BD28E8C79C74976002B05 /* IfTag.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B3EF2372264C396DB01451491670664E /* StencilSwiftTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E6E3AC6AD08BD41D2CC76F05CB2528E /* StencilSwiftTemplate.swift */; }; + B65CC4D6EE2210495A18E7695A3E6DC5 /* Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F48C3A7C467D2F0654C94D3695B3944 /* Extension.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C22E1920B40D3E75EE6C1B253A0B3E91 /* IfTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28870438F21287F21C5D7A0EF629D4BB /* IfTag.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; E436943415A371D33CD28BF20935A2F9 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2497E0C37C035DB8276C0C7335E3FC93 /* Cocoa.framework */; }; - F83DF009352A70B747BDA63DBF87103F /* ForTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D548C8AFFA37156961C8C7A68FB822B /* ForTag.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F93EC375CD4D233014C44DBDE515C6D2 /* Lexer.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7C923509E246EB503803280D3DF0817 /* Lexer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FDC0D30B75818E095F0DDB76E1D685A6 /* Include.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29363D9DEAE58B3E8DD305DB22994217 /* Include.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FEA0E65F043F875CEFBF41D9B162D461 /* Parser.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE270DCDBFE0FDCFEB26C07BA8E90C78 /* Parser.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FEA7A08C9205771813957F444548D544 /* SwiftIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5EEFF95F53473C8F25750BB4325579A /* SwiftIdentifier.swift */; }; + F83DF009352A70B747BDA63DBF87103F /* ForTag.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB7FF43C7B915A2C2740EA66673BD96D /* ForTag.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F93EC375CD4D233014C44DBDE515C6D2 /* Lexer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BDB35EDE9F6D2AD5BF0FC3654FDBC3A /* Lexer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + FDC0D30B75818E095F0DDB76E1D685A6 /* Include.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B0A35EBE0489745D72D08828CACB4A1 /* Include.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + FEA0E65F043F875CEFBF41D9B162D461 /* Parser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 229D222463340DD34988AD70528DCF2A /* Parser.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -98,66 +101,69 @@ /* Begin PBXFileReference section */ 0436538F42B0A2EC1C972F8EE47937E0 /* PathKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PathKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 06E5680F77898FA7B456DBF80297AB23 /* Pods-Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Tests-frameworks.sh"; sourceTree = ""; }; - 0E79537EFDFE2B491219C339372963D3 /* PathKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PathKit.xcconfig; sourceTree = ""; }; - 0FD170EFABB6C77A962C1702B6AFB585 /* Stencil-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Stencil-prefix.pch"; sourceTree = ""; }; + 0A7A4E42719B41FC4AEE5433DE3AEB11 /* NowTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NowTag.swift; path = Sources/NowTag.swift; sourceTree = ""; }; + 0B0A35EBE0489745D72D08828CACB4A1 /* Include.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Include.swift; path = Sources/Include.swift; sourceTree = ""; }; + 0CF4A8520C1218AF67900E6530CD3697 /* Filters.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filters.swift; path = Sources/Filters.swift; sourceTree = ""; }; 1143DC189DEAEC4A1278249254968FB1 /* Pods-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Tests.debug.xcconfig"; sourceTree = ""; }; - 119C58B0F90BFCF564EAE12CA39D69CD /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Errors.swift; sourceTree = ""; }; 11F7F2E3F010D24453E40821938EF8EC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 122560653CE3965ABFFDB00ADF1F82C6 /* StencilSwiftKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = StencilSwiftKit.modulemap; sourceTree = ""; }; - 12B93CE6C969FE0F70FEAD7EE89F3667 /* CallNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CallNode.swift; path = Sources/CallNode.swift; sourceTree = ""; }; - 1BCE5C2E6556FF2E5D4EB9DA7805891D /* Stencil.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Stencil.modulemap; sourceTree = ""; }; + 12E55ED20B9E30F6749CA776677DCA9B /* Inheritence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Inheritence.swift; path = Sources/Inheritence.swift; sourceTree = ""; }; + 143CA7F9E6B2C424ACBE00FA134770E5 /* PathKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PathKit.xcconfig; sourceTree = ""; }; + 15918E283A01235922CEAD28EF2D65AE /* Stencil.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Stencil.xcconfig; sourceTree = ""; }; + 17DC3F7FE727780247B8744142177850 /* StencilSwiftKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "StencilSwiftKit-umbrella.h"; sourceTree = ""; }; + 17EFAD74A7DA63D24C13B9C608B8D586 /* Node.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Node.swift; path = Sources/Node.swift; sourceTree = ""; }; + 19687C80B4D33105F8B0A50D7905E033 /* Stencil-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Stencil-umbrella.h"; sourceTree = ""; }; + 229D222463340DD34988AD70528DCF2A /* Parser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Parser.swift; path = Sources/Parser.swift; sourceTree = ""; }; + 23F45792515EA0BDA702EB7E0B2AF774 /* Stencil-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Stencil-prefix.pch"; sourceTree = ""; }; 2497E0C37C035DB8276C0C7335E3FC93 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; }; - 29363D9DEAE58B3E8DD305DB22994217 /* Include.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Include.swift; path = Sources/Include.swift; sourceTree = ""; }; + 27A349896F439030FE75876323217C42 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Expression.swift; sourceTree = ""; }; + 28870438F21287F21C5D7A0EF629D4BB /* IfTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IfTag.swift; path = Sources/IfTag.swift; sourceTree = ""; }; + 2A5426BCBC806A6AA5A780F481547038 /* Tokenizer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Tokenizer.swift; path = Sources/Tokenizer.swift; sourceTree = ""; }; 2C8AAD97E22D7F6B08B73B0AE02BFA6D /* Pods-Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Tests-resources.sh"; sourceTree = ""; }; 2E6EDE0590FA1A030C93F83C2EEFC65C /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Tests.release.xcconfig"; sourceTree = ""; }; - 303702374300CDC6D24181997E45C550 /* Stencil-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Stencil-umbrella.h"; sourceTree = ""; }; - 339A395A41387ECDC2D106FA04A1F34F /* PathKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PathKit.swift; path = Sources/PathKit.swift; sourceTree = ""; }; + 2FEEFE8EAE28DF27817FEE9A533F167D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 351D229C0FCFC7B3571671631111EE1C /* Pods_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Tests.framework; path = "Pods-Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 37E2458E14EB1D717659E882410C1505 /* Loader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Loader.swift; path = Sources/Loader.swift; sourceTree = ""; }; - 3FF51E54F26A48E7403325D14C074BF4 /* StencilSwiftKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "StencilSwiftKit-umbrella.h"; sourceTree = ""; }; + 3B5A7D3492E3188BAA219C2BF03DB7B8 /* Loader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Loader.swift; path = Sources/Loader.swift; sourceTree = ""; }; + 3BDB35EDE9F6D2AD5BF0FC3654FDBC3A /* Lexer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lexer.swift; path = Sources/Lexer.swift; sourceTree = ""; }; + 3D4F053F5586CE716E54A30343AA0613 /* Environment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Environment.swift; path = Sources/Environment.swift; sourceTree = ""; }; + 3D886E4A562B553F03DE132BF1ED7B57 /* PathKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PathKit.swift; path = Sources/PathKit.swift; sourceTree = ""; }; 4309AA7478DD6B254C478AE5335748BA /* Pods-Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Tests-acknowledgements.plist"; sourceTree = ""; }; + 471B08603492AF191E6851BD2FF8B2E5 /* Context.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Context.swift; path = Sources/Context.swift; sourceTree = ""; }; 49BCF2F8CB8DBEA0E51D00A9DE6AC7F5 /* Stencil.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Stencil.framework; path = Stencil.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4D6847DF518406FCD4CEC725678C4597 /* PathKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PathKit-dummy.m"; sourceTree = ""; }; + 4E17942CE2E3EE78D5CC65495C2CC185 /* SwiftIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftIdentifier.swift; path = Sources/SwiftIdentifier.swift; sourceTree = ""; }; 4F35C03EE539651D8168B79F18A1DF5B /* Pods-Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Tests.modulemap"; sourceTree = ""; }; + 4FCD0E5F85AD68FC2B5C5C2027C53A20 /* Parameters.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Parameters.swift; path = Sources/Parameters.swift; sourceTree = ""; }; 52E08CA96B2F20724148FF5361AD7206 /* Pods-Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Tests-umbrella.h"; sourceTree = ""; }; - 532F45E9240974FF0E060BAF83490D44 /* Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extension.swift; path = Sources/Extension.swift; sourceTree = ""; }; - 54C60730CDF8E1C02BF5CCAB3F09A4E3 /* Inheritence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Inheritence.swift; path = Sources/Inheritence.swift; sourceTree = ""; }; - 56B09F20715FDF89822A1EC75F6B94B4 /* FilterTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FilterTag.swift; path = Sources/FilterTag.swift; sourceTree = ""; }; - 5B14DCF7FD2687174EAA39FED6851BA5 /* Node.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Node.swift; path = Sources/Node.swift; sourceTree = ""; }; - 66F7B6885A87B4DD3DF9C1F0233F316D /* Tokenizer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Tokenizer.swift; path = Sources/Tokenizer.swift; sourceTree = ""; }; - 6A606AF7935ABEBAAF9C9C03E70CDC5A /* Filters.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filters.swift; path = Sources/Filters.swift; sourceTree = ""; }; - 6D2FDB7D7F2A74BE07E7BFECC1B4627A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5BC614B3588A118B2CFC86850D3FB4DE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 5F48C3A7C467D2F0654C94D3695B3944 /* Extension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extension.swift; path = Sources/Extension.swift; sourceTree = ""; }; + 6DB7555160DBE01F8C52C2892AD26758 /* Template.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Template.swift; path = Sources/Template.swift; sourceTree = ""; }; + 6E05110303F4EF1BF79FA0724CF3E313 /* SetNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SetNode.swift; path = Sources/SetNode.swift; sourceTree = ""; }; + 6E33D4166ADB93EA045C47E2BB792F7D /* StencilSwiftKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = StencilSwiftKit.modulemap; sourceTree = ""; }; 6E3DE9DADD254D64C598089530A5932B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 748DB2173F65D116A3202AB0A7476254 /* PathKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PathKit-umbrella.h"; sourceTree = ""; }; + 78186B4F98B6CEEF9AE97498910C521D /* Stencil-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Stencil-dummy.m"; sourceTree = ""; }; 7DB310C86ADAE310E9DF111FDD487FAF /* StencilSwiftKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = StencilSwiftKit.framework; path = StencilSwiftKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 852AB7C7B5C756E8AFB1188F3F2DD2D6 /* Variable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Variable.swift; path = Sources/Variable.swift; sourceTree = ""; }; - 85382037057BD28E8C79C74976002B05 /* IfTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = IfTag.swift; path = Sources/IfTag.swift; sourceTree = ""; }; - 86D03839ED51573E3E3BD08E495E79BE /* PathKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = PathKit.modulemap; sourceTree = ""; }; - 8AD680581419CDE1F899C6B99D6890D8 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 8D548C8AFFA37156961C8C7A68FB822B /* ForTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ForTag.swift; path = Sources/ForTag.swift; sourceTree = ""; }; - 8E33B1DD7582AEBF9CBCC1869BCB7D3A /* PathKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PathKit-dummy.m"; sourceTree = ""; }; + 7E6E3AC6AD08BD41D2CC76F05CB2528E /* StencilSwiftTemplate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StencilSwiftTemplate.swift; path = Sources/StencilSwiftTemplate.swift; sourceTree = ""; }; + 840C25AE18F6BFA5D9D4EADF2B209201 /* PathKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = PathKit.modulemap; sourceTree = ""; }; + 851F21E75DCC0A824DB1F4BE28D2812B /* StencilSwiftKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "StencilSwiftKit-prefix.pch"; sourceTree = ""; }; + 87B03929355C96691F74E139BF7F86F2 /* Variable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Variable.swift; path = Sources/Variable.swift; sourceTree = ""; }; + 91BE2C76E74E5F180983F9BCC1A5B853 /* Context.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Context.swift; path = Sources/Context.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 93A6BBF8F87364A322E7D3D252783B10 /* PathKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PathKit-prefix.pch"; sourceTree = ""; }; + 98FDFB829DE6394E7130B68A57716A8E /* StencilSwiftKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "StencilSwiftKit-dummy.m"; sourceTree = ""; }; 9A68FA9661EC6B4BA5415DDD474F7F00 /* Stencil.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Stencil.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 9B114595AF1CAB648807807290AFC0EA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 9D45480978A5D67188FD75399701D3E6 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Expression.swift; sourceTree = ""; }; - A18F5E36F57570A1D1EECAFE6FB9BD26 /* NowTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NowTag.swift; path = Sources/NowTag.swift; sourceTree = ""; }; - A7C923509E246EB503803280D3DF0817 /* Lexer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Lexer.swift; path = Sources/Lexer.swift; sourceTree = ""; }; - AE270DCDBFE0FDCFEB26C07BA8E90C78 /* Parser.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Parser.swift; path = Sources/Parser.swift; sourceTree = ""; }; - AE5450BF320BAA3C59F1670924C2CE39 /* Stencil-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Stencil-dummy.m"; sourceTree = ""; }; - B1A35ADDA9CE72FC8447E7145AA92019 /* Template.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Template.swift; path = Sources/Template.swift; sourceTree = ""; }; - B3332B5B3D33D1710C37F9396E27FB9E /* Filters.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filters.swift; path = Sources/Filters.swift; sourceTree = ""; }; - B5EEFF95F53473C8F25750BB4325579A /* SwiftIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftIdentifier.swift; path = Sources/SwiftIdentifier.swift; sourceTree = ""; }; - BF0E426CF32AAC9C225675688E635F53 /* Stencil.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Stencil.xcconfig; sourceTree = ""; }; + 9D611326DAC860803131BD5BB5E59B08 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Errors.swift; sourceTree = ""; }; + 9DCE35B935642F72374C57F738C01E50 /* Stencil.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Stencil.modulemap; sourceTree = ""; }; + A41185ACB4FC0D992358796D30171E98 /* StencilSwiftKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = StencilSwiftKit.xcconfig; sourceTree = ""; }; + A694DB2B01D4A14951921483F1CB241C /* Environment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Environment.swift; path = Sources/Environment.swift; sourceTree = ""; }; + AB343D6C2B388F60FB9FE3B4D88AF032 /* CallNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CallNode.swift; path = Sources/CallNode.swift; sourceTree = ""; }; + AB7FF43C7B915A2C2740EA66673BD96D /* ForTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ForTag.swift; path = Sources/ForTag.swift; sourceTree = ""; }; + B6A3AE610B01800EEF2DA5F4D2ADF4A2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; BFE531A4BA3F8D5F7B6C9BD6D217DA29 /* Pods-Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Tests-acknowledgements.markdown"; sourceTree = ""; }; C0ABA9994C05CE2F400945671B7038BA /* Pods-Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Tests-dummy.m"; sourceTree = ""; }; + C52696DD24AA53FD3F13D29D634BFDC5 /* PathKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PathKit-prefix.pch"; sourceTree = ""; }; C68D522B00371B910EC16028EBD47384 /* PathKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PathKit.framework; path = PathKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - CE6DCD2E80A477ACC5B6B8DE9A6C3FEE /* SwiftTemplate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftTemplate.swift; path = Sources/SwiftTemplate.swift; sourceTree = ""; }; - D01DBD5FA8BF9736F379972E358B0B2C /* Environment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Environment.swift; path = Sources/Environment.swift; sourceTree = ""; }; - D13D0FEC08671617A97C0BAE39794371 /* Context.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Context.swift; path = Sources/Context.swift; sourceTree = ""; }; - D835DE3B71A7169DA2270ABDEF90294F /* StencilSwiftKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "StencilSwiftKit-prefix.pch"; sourceTree = ""; }; - DBB5B76FF9C49D27D0A85478280B8BCC /* StencilSwiftKit.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = StencilSwiftKit.xcconfig; sourceTree = ""; }; - DCCE252CCAFC1D1EA7E2AB7B272B9C2F /* SetNode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SetNode.swift; path = Sources/SetNode.swift; sourceTree = ""; }; - E55C2675F7618F278BDEAA8A20739C3D /* PathKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PathKit-umbrella.h"; sourceTree = ""; }; - EF5B091B960F320BC6EDD221B78605F7 /* StencilSwiftKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "StencilSwiftKit-dummy.m"; sourceTree = ""; }; + CEED6A59ADC5619FC1240A666BC33443 /* FilterTag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FilterTag.swift; path = Sources/FilterTag.swift; sourceTree = ""; }; + E85D395ECDAA60C839C5449D4A186461 /* Filters.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filters.swift; path = Sources/Filters.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -208,6 +214,20 @@ name = "Targets Support Files"; sourceTree = ""; }; + 0D7DEDC1E24706F320847BEC3F1128F1 /* Support Files */ = { + isa = PBXGroup; + children = ( + 2FEEFE8EAE28DF27817FEE9A533F167D /* Info.plist */, + 840C25AE18F6BFA5D9D4EADF2B209201 /* PathKit.modulemap */, + 143CA7F9E6B2C424ACBE00FA134770E5 /* PathKit.xcconfig */, + 4D6847DF518406FCD4CEC725678C4597 /* PathKit-dummy.m */, + C52696DD24AA53FD3F13D29D634BFDC5 /* PathKit-prefix.pch */, + 748DB2173F65D116A3202AB0A7476254 /* PathKit-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/PathKit"; + sourceTree = ""; + }; 1F5E5F8A51A1DB712AA69F86066566AE /* Frameworks */ = { isa = PBXGroup; children = ( @@ -218,6 +238,33 @@ name = Frameworks; sourceTree = ""; }; + 3C2262D8FC7D0DE806F9A172ABD96D96 /* PathKit */ = { + isa = PBXGroup; + children = ( + 3D886E4A562B553F03DE132BF1ED7B57 /* PathKit.swift */, + 0D7DEDC1E24706F320847BEC3F1128F1 /* Support Files */, + ); + name = PathKit; + path = PathKit; + sourceTree = ""; + }; + 3CD8826C64C7E23617A14FBF1E62129A /* StencilSwiftKit */ = { + isa = PBXGroup; + children = ( + AB343D6C2B388F60FB9FE3B4D88AF032 /* CallNode.swift */, + 91BE2C76E74E5F180983F9BCC1A5B853 /* Context.swift */, + A694DB2B01D4A14951921483F1CB241C /* Environment.swift */, + E85D395ECDAA60C839C5449D4A186461 /* Filters.swift */, + 4FCD0E5F85AD68FC2B5C5C2027C53A20 /* Parameters.swift */, + 6E05110303F4EF1BF79FA0724CF3E313 /* SetNode.swift */, + 7E6E3AC6AD08BD41D2CC76F05CB2528E /* StencilSwiftTemplate.swift */, + 4E17942CE2E3EE78D5CC65495C2CC185 /* SwiftIdentifier.swift */, + 5F63477E0DA27B028A56331CE06CE15F /* Support Files */, + ); + name = StencilSwiftKit; + path = StencilSwiftKit; + sourceTree = ""; + }; 47034B618C7AB6B73C31D4C6B5F235F8 /* Pods-Tests */ = { isa = PBXGroup; children = ( @@ -236,57 +283,25 @@ path = "Target Support Files/Pods-Tests"; sourceTree = ""; }; - 4EB9F219007B0BA8660E109E797ED52A /* Stencil */ = { - isa = PBXGroup; - children = ( - D13D0FEC08671617A97C0BAE39794371 /* Context.swift */, - D01DBD5FA8BF9736F379972E358B0B2C /* Environment.swift */, - 119C58B0F90BFCF564EAE12CA39D69CD /* Errors.swift */, - 9D45480978A5D67188FD75399701D3E6 /* Expression.swift */, - 532F45E9240974FF0E060BAF83490D44 /* Extension.swift */, - 6A606AF7935ABEBAAF9C9C03E70CDC5A /* Filters.swift */, - 56B09F20715FDF89822A1EC75F6B94B4 /* FilterTag.swift */, - 8D548C8AFFA37156961C8C7A68FB822B /* ForTag.swift */, - 85382037057BD28E8C79C74976002B05 /* IfTag.swift */, - 29363D9DEAE58B3E8DD305DB22994217 /* Include.swift */, - 54C60730CDF8E1C02BF5CCAB3F09A4E3 /* Inheritence.swift */, - A7C923509E246EB503803280D3DF0817 /* Lexer.swift */, - 37E2458E14EB1D717659E882410C1505 /* Loader.swift */, - 5B14DCF7FD2687174EAA39FED6851BA5 /* Node.swift */, - A18F5E36F57570A1D1EECAFE6FB9BD26 /* NowTag.swift */, - AE270DCDBFE0FDCFEB26C07BA8E90C78 /* Parser.swift */, - B1A35ADDA9CE72FC8447E7145AA92019 /* Template.swift */, - 66F7B6885A87B4DD3DF9C1F0233F316D /* Tokenizer.swift */, - 852AB7C7B5C756E8AFB1188F3F2DD2D6 /* Variable.swift */, - 62B3DB92D47617C31623F6BEF6C4B7B8 /* Support Files */, - ); - name = Stencil; - path = Stencil; - sourceTree = ""; - }; - 62B3DB92D47617C31623F6BEF6C4B7B8 /* Support Files */ = { + 5A79C364D63423AC447CCF5AB7D7F123 /* Pods */ = { isa = PBXGroup; children = ( - 8AD680581419CDE1F899C6B99D6890D8 /* Info.plist */, - 1BCE5C2E6556FF2E5D4EB9DA7805891D /* Stencil.modulemap */, - BF0E426CF32AAC9C225675688E635F53 /* Stencil.xcconfig */, - AE5450BF320BAA3C59F1670924C2CE39 /* Stencil-dummy.m */, - 0FD170EFABB6C77A962C1702B6AFB585 /* Stencil-prefix.pch */, - 303702374300CDC6D24181997E45C550 /* Stencil-umbrella.h */, + 3C2262D8FC7D0DE806F9A172ABD96D96 /* PathKit */, + 9CEB4D9E24EF85B6A9330EF1B5005F76 /* Stencil */, + 3CD8826C64C7E23617A14FBF1E62129A /* StencilSwiftKit */, ); - name = "Support Files"; - path = "../Target Support Files/Stencil"; + name = Pods; sourceTree = ""; }; - 73B08E6AF95385A26CB7FA3B9A80EED1 /* Support Files */ = { + 5F63477E0DA27B028A56331CE06CE15F /* Support Files */ = { isa = PBXGroup; children = ( - 6D2FDB7D7F2A74BE07E7BFECC1B4627A /* Info.plist */, - 122560653CE3965ABFFDB00ADF1F82C6 /* StencilSwiftKit.modulemap */, - DBB5B76FF9C49D27D0A85478280B8BCC /* StencilSwiftKit.xcconfig */, - EF5B091B960F320BC6EDD221B78605F7 /* StencilSwiftKit-dummy.m */, - D835DE3B71A7169DA2270ABDEF90294F /* StencilSwiftKit-prefix.pch */, - 3FF51E54F26A48E7403325D14C074BF4 /* StencilSwiftKit-umbrella.h */, + B6A3AE610B01800EEF2DA5F4D2ADF4A2 /* Info.plist */, + 6E33D4166ADB93EA045C47E2BB792F7D /* StencilSwiftKit.modulemap */, + A41185ACB4FC0D992358796D30171E98 /* StencilSwiftKit.xcconfig */, + 98FDFB829DE6394E7130B68A57716A8E /* StencilSwiftKit-dummy.m */, + 851F21E75DCC0A824DB1F4BE28D2812B /* StencilSwiftKit-prefix.pch */, + 17DC3F7FE727780247B8744142177850 /* StencilSwiftKit-umbrella.h */, ); name = "Support Files"; path = "../Target Support Files/StencilSwiftKit"; @@ -297,24 +312,52 @@ children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 1F5E5F8A51A1DB712AA69F86066566AE /* Frameworks */, - F3F3C04918EB71FF89F20356319070F3 /* Pods */, + 5A79C364D63423AC447CCF5AB7D7F123 /* Pods */, B499EA03E3E7FF8D31B3BE631B1240D0 /* Products */, 000722C3134BAC39CFC2600254B1E03E /* Targets Support Files */, ); sourceTree = ""; }; - 8DF58FC5CD76873092C725BA8F776417 /* StencilSwiftKit */ = { + 991331CF8A51CFBD8AC925C65ED31754 /* Support Files */ = { isa = PBXGroup; children = ( - 12B93CE6C969FE0F70FEAD7EE89F3667 /* CallNode.swift */, - B3332B5B3D33D1710C37F9396E27FB9E /* Filters.swift */, - DCCE252CCAFC1D1EA7E2AB7B272B9C2F /* SetNode.swift */, - B5EEFF95F53473C8F25750BB4325579A /* SwiftIdentifier.swift */, - CE6DCD2E80A477ACC5B6B8DE9A6C3FEE /* SwiftTemplate.swift */, - 73B08E6AF95385A26CB7FA3B9A80EED1 /* Support Files */, + 5BC614B3588A118B2CFC86850D3FB4DE /* Info.plist */, + 9DCE35B935642F72374C57F738C01E50 /* Stencil.modulemap */, + 15918E283A01235922CEAD28EF2D65AE /* Stencil.xcconfig */, + 78186B4F98B6CEEF9AE97498910C521D /* Stencil-dummy.m */, + 23F45792515EA0BDA702EB7E0B2AF774 /* Stencil-prefix.pch */, + 19687C80B4D33105F8B0A50D7905E033 /* Stencil-umbrella.h */, ); - name = StencilSwiftKit; - path = StencilSwiftKit; + name = "Support Files"; + path = "../Target Support Files/Stencil"; + sourceTree = ""; + }; + 9CEB4D9E24EF85B6A9330EF1B5005F76 /* Stencil */ = { + isa = PBXGroup; + children = ( + 471B08603492AF191E6851BD2FF8B2E5 /* Context.swift */, + 3D4F053F5586CE716E54A30343AA0613 /* Environment.swift */, + 9D611326DAC860803131BD5BB5E59B08 /* Errors.swift */, + 27A349896F439030FE75876323217C42 /* Expression.swift */, + 5F48C3A7C467D2F0654C94D3695B3944 /* Extension.swift */, + 0CF4A8520C1218AF67900E6530CD3697 /* Filters.swift */, + CEED6A59ADC5619FC1240A666BC33443 /* FilterTag.swift */, + AB7FF43C7B915A2C2740EA66673BD96D /* ForTag.swift */, + 28870438F21287F21C5D7A0EF629D4BB /* IfTag.swift */, + 0B0A35EBE0489745D72D08828CACB4A1 /* Include.swift */, + 12E55ED20B9E30F6749CA776677DCA9B /* Inheritence.swift */, + 3BDB35EDE9F6D2AD5BF0FC3654FDBC3A /* Lexer.swift */, + 3B5A7D3492E3188BAA219C2BF03DB7B8 /* Loader.swift */, + 17EFAD74A7DA63D24C13B9C608B8D586 /* Node.swift */, + 0A7A4E42719B41FC4AEE5433DE3AEB11 /* NowTag.swift */, + 229D222463340DD34988AD70528DCF2A /* Parser.swift */, + 6DB7555160DBE01F8C52C2892AD26758 /* Template.swift */, + 2A5426BCBC806A6AA5A780F481547038 /* Tokenizer.swift */, + 87B03929355C96691F74E139BF7F86F2 /* Variable.swift */, + 991331CF8A51CFBD8AC925C65ED31754 /* Support Files */, + ); + name = Stencil; + path = Stencil; sourceTree = ""; }; B499EA03E3E7FF8D31B3BE631B1240D0 /* Products */ = { @@ -337,40 +380,6 @@ name = "OS X"; sourceTree = ""; }; - BE4239F9522E3574CCA0B4F39132733E /* PathKit */ = { - isa = PBXGroup; - children = ( - 339A395A41387ECDC2D106FA04A1F34F /* PathKit.swift */, - CF627E0C8633962C743C6B5826683560 /* Support Files */, - ); - name = PathKit; - path = PathKit; - sourceTree = ""; - }; - CF627E0C8633962C743C6B5826683560 /* Support Files */ = { - isa = PBXGroup; - children = ( - 9B114595AF1CAB648807807290AFC0EA /* Info.plist */, - 86D03839ED51573E3E3BD08E495E79BE /* PathKit.modulemap */, - 0E79537EFDFE2B491219C339372963D3 /* PathKit.xcconfig */, - 8E33B1DD7582AEBF9CBCC1869BCB7D3A /* PathKit-dummy.m */, - 93A6BBF8F87364A322E7D3D252783B10 /* PathKit-prefix.pch */, - E55C2675F7618F278BDEAA8A20739C3D /* PathKit-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/PathKit"; - sourceTree = ""; - }; - F3F3C04918EB71FF89F20356319070F3 /* Pods */ = { - isa = PBXGroup; - children = ( - BE4239F9522E3574CCA0B4F39132733E /* PathKit */, - 4EB9F219007B0BA8660E109E797ED52A /* Stencil */, - 8DF58FC5CD76873092C725BA8F776417 /* StencilSwiftKit */, - ); - name = Pods; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -468,7 +477,7 @@ isa = PBXNativeTarget; buildConfigurationList = 129C5DBD1F855F49F876BF6123ACCEA1 /* Build configuration list for PBXNativeTarget "StencilSwiftKit" */; buildPhases = ( - E14D849248EAEC6D2DA6E7C0EE6A4461 /* Sources */, + 28917C4779F065D326C10CA246D87197 /* Sources */, 0F3EB15820713BB45F78D235C5EDFAB9 /* Frameworks */, D69B46456E4A5977AF2F2E41E1569930 /* Headers */, ); @@ -513,6 +522,22 @@ /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ + 28917C4779F065D326C10CA246D87197 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 89B6E9CA52E2FB8E6FAC9F25F19C85BA /* CallNode.swift in Sources */, + 02E67E3FB7991FA56E20E9E5C1B81DAF /* Context.swift in Sources */, + 13E86D0ADB461206F01308E1EFD320AF /* Environment.swift in Sources */, + 6091F58F99C5B40FB02A521CEC1FA0DA /* Filters.swift in Sources */, + 5F609800FB1EE08F96356C6D83C0CA4A /* Parameters.swift in Sources */, + 021F29432B3F85185827E0DC0EE78A79 /* SetNode.swift in Sources */, + 250F7C700371BFFB425A64130DD9C5E3 /* StencilSwiftKit-dummy.m in Sources */, + B3EF2372264C396DB01451491670664E /* StencilSwiftTemplate.swift in Sources */, + 5D9AB8DFA4D1BD052E1AC638A0AE5D5C /* SwiftIdentifier.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 3D59F8770039F9D6E69A0F74F304A02A /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -549,19 +574,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - E14D849248EAEC6D2DA6E7C0EE6A4461 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - AE16D25DF5043F36FFA85103463D7ADE /* CallNode.swift in Sources */, - 339CE7D9844A652B598A9605B0E301BA /* Filters.swift in Sources */, - BAFB41FE6819D8068BD91DF6A8E88E34 /* SetNode.swift in Sources */, - 97E9BD613CA56D3A5D619D1CF68F5F97 /* StencilSwiftKit-dummy.m in Sources */, - FEA7A08C9205771813957F444548D544 /* SwiftIdentifier.swift in Sources */, - 85A2AC8B20BDBDF40654856FD965354B /* SwiftTemplate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; ED7F721EA5274D6B4F54972B473CC719 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -614,7 +626,7 @@ /* Begin XCBuildConfiguration section */ 07D806167CD6B3291DDD8EABAE2E5033 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0E79537EFDFE2B491219C339372963D3 /* PathKit.xcconfig */; + baseConfigurationReference = 143CA7F9E6B2C424ACBE00FA134770E5 /* PathKit.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -686,7 +698,7 @@ }; 1A273A5EFCFA51823F711D526DBB89E6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DBB5B76FF9C49D27D0A85478280B8BCC /* StencilSwiftKit.xcconfig */; + baseConfigurationReference = A41185ACB4FC0D992358796D30171E98 /* StencilSwiftKit.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -721,7 +733,7 @@ }; 3F0841B5E0D42ADBF691A02A979C914C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BF0E426CF32AAC9C225675688E635F53 /* Stencil.xcconfig */; + baseConfigurationReference = 15918E283A01235922CEAD28EF2D65AE /* Stencil.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -755,7 +767,7 @@ }; 3FE96C573F5D937AF5EF0B83C65B0A3F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BF0E426CF32AAC9C225675688E635F53 /* Stencil.xcconfig */; + baseConfigurationReference = 15918E283A01235922CEAD28EF2D65AE /* Stencil.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -830,7 +842,7 @@ }; 6DBE1542CAA56B2EBB1188C387EBA0FF /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = DBB5B76FF9C49D27D0A85478280B8BCC /* StencilSwiftKit.xcconfig */; + baseConfigurationReference = A41185ACB4FC0D992358796D30171E98 /* StencilSwiftKit.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -902,7 +914,7 @@ }; C0615970E7397BC442586C7600152196 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0E79537EFDFE2B491219C339372963D3 /* PathKit.xcconfig */; + baseConfigurationReference = 143CA7F9E6B2C424ACBE00FA134770E5 /* PathKit.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "-"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; diff --git a/Tests/Pods/StencilSwiftKit/README.md b/Tests/Pods/StencilSwiftKit/README.md index 304e89d..9e7217d 100644 --- a/Tests/Pods/StencilSwiftKit/README.md +++ b/Tests/Pods/StencilSwiftKit/README.md @@ -34,17 +34,45 @@ _TODO: [Write more extension Documentation](https://github.com/SwiftGen/StencilS * `percent` * `escapeReservedKeywords`: Escape keywods reserved in the Swift language, by wrapping them inside backticks so that the can be used as regular escape keywords in Swift code. -## SwiftTemplate +## StencilSwiftTemplate -This framwork also contains [a `SwiftTemplate` class](https://github.com/SwiftGen/StencilSwiftKit/blob/master/Sources/SwiftTemplate.swift#L10), which is a subclass of `Stencil.Template` dedicated to remove extra newlines when rendering the template. +This framework also contains [a `StencilSwiftTemplate` class](https://github.com/SwiftGen/StencilSwiftKit/blob/master/Sources/StencilSwiftTemplate.swift#L10), which is a subclass of `Stencil.Template` dedicated to remove extra newlines when rendering the template. -Indeed, such extra newlines could otherwise be inserted in the generated output because you want your template to be well formatted, and that can end up with Stencil nodes like `{% for … %}` and `{% if … %}` be alone in some lines of your template and that would render into nothing by themselves, generating empty lines in the output. +Indeed, such extra newlines could otherwise be inserted in the generated output because you want your template to be well formatted, and that can end up with Stencil nodes like `{% for … %}` and `{% if … %}` be alone in some lines of your template and that would render into nothing by themselves, generating empty lines in the output. This template subclass aims to remove those lines generated by using a simple workaround when rendering, until there's an embeded way to handle that in Stencil proper (see [Stencil/#22](https://github.com/kylef/Stencil/issues/22)). -## Stencil.Extension +## Stencil.Extension & swiftStencilEnvironment -This framework also contains a [`stencilSwiftExtension()`](https://github.com/SwiftGen/StencilSwiftKit/blob/master/Sources/SwiftTemplate.swift#L45-L61) function which returns a `Stencil.Extension` already configured with all the nodes and filters listed above. +This framework also contains [helper methods for `Stencil.Extension` and `Stencil.Environment`](https://github.com/SwiftGen/StencilSwiftKit/blob/master/Sources/Environment.swift), to easily register all the tags and filters listed above on an existing `Stencil.Extension`, as well as to easily get a `Stencil.Environment` preconfigured with both those tags & filters `Extension` and the `StencilSwiftTemplate`. -Use it when you configure your code to tell `Stencil` to register those nodes & filters, for example when building your `Stencil.Environment(extension: …, templateClass: …)` +## Parameters + +This framework contains an additional parser, meant to parse a list of parameters from the CLI. For example, using [Commander](https://github.com/kylef/Commander), if you receive a `[String]` from a `VariadicOption`, you can use the parser to convert it into a structured dictionary. For example: + +```swift +["foo=1", "bar=2", "baz.qux=hello", "baz.items=a", "baz.items=b", "something"] +``` + +will become + +```swift +[ + "foo": "1", + "bar": "2", + "baz": [ + "qux": "hello", + "items": [ + "a", + "b" + ] + ], + something: true +] +``` + +For easier use, you can use the `StencilContext.enrich(context:parameters:environment:)` function to add the following variables to a context: + +- `param`: the parsed parameters using the parser mentioned above. +- `env`: a dictionary with all available environment variables (such as `PATH`). diff --git a/Tests/Pods/StencilSwiftKit/Sources/CallNode.swift b/Tests/Pods/StencilSwiftKit/Sources/CallNode.swift index eaee246..f44c05c 100644 --- a/Tests/Pods/StencilSwiftKit/Sources/CallNode.swift +++ b/Tests/Pods/StencilSwiftKit/Sources/CallNode.swift @@ -6,7 +6,7 @@ import Stencil -private struct CallableBlock: NodeType { +struct CallableBlock: NodeType { let parameters: [String] let nodes: [NodeType] @@ -26,9 +26,9 @@ private struct CallableBlock: NodeType { } class MacroNode: NodeType { - private let variableName: String - private let parameters: [String] - private let nodes: [NodeType] + let variableName: String + let parameters: [String] + let nodes: [NodeType] class func parse(_ parser: TokenParser, token: Token) throws -> NodeType { let components = token.components() @@ -60,8 +60,8 @@ class MacroNode: NodeType { } class CallNode: NodeType { - private let variableName: String - private let arguments: [Variable] + let variableName: String + let arguments: [Variable] class func parse(_ parser: TokenParser, token: Token) throws -> NodeType { let components = token.components() diff --git a/Tests/Pods/StencilSwiftKit/Sources/Context.swift b/Tests/Pods/StencilSwiftKit/Sources/Context.swift new file mode 100644 index 0000000..ca649f3 --- /dev/null +++ b/Tests/Pods/StencilSwiftKit/Sources/Context.swift @@ -0,0 +1,30 @@ +// +// Context.swift +// Pods +// +// Created by David Jennes on 14/02/2017. +// +// + +import Foundation + +public enum StencilContext { + public static let environment = "env" + public static let parameters = "param" + + /** + Enriches a stencil context with parsed parameters and environment variables + + - Parameter context: The stencil context + - Parameter parameters: List of strings, will be parsed using the `Parameters.parse(items:)` method + - Parameter environment: Environment variables, defaults to `ProcessInfo().environment` + */ + public static func enrich(context: [String: Any], parameters: [String], environment: [String: String] = ProcessInfo().environment) throws -> [String: Any] { + var context = context + + context[StencilContext.environment] = environment + context[StencilContext.parameters] = try Parameters.parse(items: parameters) + + return context + } +} diff --git a/Tests/Pods/StencilSwiftKit/Sources/Environment.swift b/Tests/Pods/StencilSwiftKit/Sources/Environment.swift new file mode 100644 index 0000000..f7026ff --- /dev/null +++ b/Tests/Pods/StencilSwiftKit/Sources/Environment.swift @@ -0,0 +1,32 @@ +// +// StencilSwiftKit +// Copyright (c) 2017 SwiftGen +// MIT Licence +// + +import Stencil + +public extension Extension { + public func registerStencilSwiftExtensions() { + registerTag("set", parser: SetNode.parse) + registerTag("macro", parser: MacroNode.parse) + registerTag("call", parser: CallNode.parse) + registerFilter("swiftIdentifier", filter: StringFilters.stringToSwiftIdentifier) + registerFilter("join", filter: ArrayFilters.join) + registerFilter("lowerFirstWord", filter: StringFilters.lowerFirstWord) + registerFilter("snakeToCamelCase", filter: StringFilters.snakeToCamelCase) + registerFilter("snakeToCamelCaseNoPrefix", filter: StringFilters.snakeToCamelCaseNoPrefix) + registerFilter("titlecase", filter: StringFilters.titlecase) + registerFilter("hexToInt", filter: NumFilters.hexToInt) + registerFilter("int255toFloat", filter: NumFilters.int255toFloat) + registerFilter("percent", filter: NumFilters.percent) + registerFilter("escapeReservedKeywords", filter: StringFilters.escapeReservedKeywords) + } +} + +public func stencilSwiftEnvironment() -> Environment { + let ext = Extension() + ext.registerStencilSwiftExtensions() + + return Environment(extensions: [ext], templateClass: StencilSwiftTemplate.self) +} diff --git a/Tests/Pods/StencilSwiftKit/Sources/Filters.swift b/Tests/Pods/StencilSwiftKit/Sources/Filters.swift index 8fcf1c6..3a9f8d4 100644 --- a/Tests/Pods/StencilSwiftKit/Sources/Filters.swift +++ b/Tests/Pods/StencilSwiftKit/Sources/Filters.swift @@ -4,6 +4,7 @@ // MIT Licence // +import Foundation import Stencil enum FilterError: Error { diff --git a/Tests/Pods/StencilSwiftKit/Sources/Parameters.swift b/Tests/Pods/StencilSwiftKit/Sources/Parameters.swift new file mode 100644 index 0000000..69a88b9 --- /dev/null +++ b/Tests/Pods/StencilSwiftKit/Sources/Parameters.swift @@ -0,0 +1,80 @@ +// +// StencilSwiftKit +// Copyright (c) 2017 SwiftGen +// MIT Licence +// + +import Foundation + +public enum ParametersError: Error { + case invalidSyntax(value: Any) + case invalidKey(key: String, value: Any) + case invalidStructure(key: String, oldValue: Any, newValue: Any) +} + +public enum Parameters { + typealias Parameter = (key: String, value: Any) + public typealias StringDict = [String: Any] + + public static func parse(items: [String]) throws -> StringDict { + let parameters: [Parameter] = try items.map { item in + let parts = item.components(separatedBy: "=") + if parts.count >= 2 { + return (key: parts[0], value: parts.dropFirst().joined(separator: "=")) + } else if let part = parts.first, parts.count == 1 && validate(key: part) { + return (key: part, value: true) + } else { + throw ParametersError.invalidSyntax(value: item) + } + } + + return try parameters.reduce(StringDict()) { + try parse(parameter: $1, result: $0) + } + } + + private static func parse(parameter: Parameter, result: StringDict) throws -> StringDict { + let parts = parameter.key.components(separatedBy: ".") + let key = parts.first ?? "" + var result = result + + // validate key + guard validate(key: key) else { throw ParametersError.invalidKey(key: parameter.key, value: parameter.value) } + + // no sub keys, may need to convert to array if repeat key if possible + if parts.count == 1 { + if let current = result[key] as? [Any] { + result[key] = current + [parameter.value] + } else if let current = result[key] as? String { + result[key] = [current, parameter.value] + } else if let current = result[key] { + throw ParametersError.invalidStructure(key: key, oldValue: current, newValue: parameter.value) + } else { + result[key] = parameter.value + } + } else if parts.count > 1 { + guard result[key] is StringDict || result[key] == nil else { + throw ParametersError.invalidStructure(key: key, oldValue: result[key] ?? "", newValue: parameter.value) + } + + // recurse into sub keys + let current = result[key] as? StringDict ?? StringDict() + let sub = (key: parts.suffix(from: 1).joined(separator: "."), value: parameter.value) + result[key] = try parse(parameter: sub, result: current) + } + + return result + } + + // a valid key is not empty and only alphanumerical or dot + private static func validate(key: String) -> Bool { + return !key.isEmpty && + key.rangeOfCharacter(from: notAlphanumericsAndDot) == nil + } + + private static let notAlphanumericsAndDot: CharacterSet = { + var result = CharacterSet.alphanumerics + result.insert(".") + return result.inverted + }() +} diff --git a/Tests/Pods/StencilSwiftKit/Sources/SetNode.swift b/Tests/Pods/StencilSwiftKit/Sources/SetNode.swift index 007af40..c7333c2 100644 --- a/Tests/Pods/StencilSwiftKit/Sources/SetNode.swift +++ b/Tests/Pods/StencilSwiftKit/Sources/SetNode.swift @@ -7,8 +7,8 @@ import Stencil class SetNode: NodeType { - private let variableName: String - private let nodes: [NodeType] + let variableName: String + let nodes: [NodeType] class func parse(_ parser: TokenParser, token: Token) throws -> NodeType { let comps = token.components() diff --git a/Tests/Pods/StencilSwiftKit/Sources/SwiftTemplate.swift b/Tests/Pods/StencilSwiftKit/Sources/StencilSwiftTemplate.swift similarity index 52% rename from Tests/Pods/StencilSwiftKit/Sources/SwiftTemplate.swift rename to Tests/Pods/StencilSwiftKit/Sources/StencilSwiftTemplate.swift index 65ed8a2..975fa5d 100644 --- a/Tests/Pods/StencilSwiftKit/Sources/SwiftTemplate.swift +++ b/Tests/Pods/StencilSwiftKit/Sources/StencilSwiftTemplate.swift @@ -4,10 +4,15 @@ // MIT Licence // +import Foundation import Stencil +#if os(Linux) && !swift(>=3.1) +typealias NSRegularExpression = RegularExpression +#endif + // Workaround until Stencil fixes https://github.com/kylef/Stencil/issues/22 -open class SwiftTemplate: Template { +open class StencilSwiftTemplate: Template { public required init(templateString: String, environment: Environment? = nil, name: String? = nil) { let templateStringWithMarkedNewlines = templateString .replacingOccurrences(of: "\n\n", with: "\n\u{000b}\n") @@ -40,26 +45,3 @@ open class SwiftTemplate: Template { return unmarkedNewlines } } - -// Create StencilSwiftKit-specific namespace including custom tags & filters -func stencilSwiftExtension() -> Extension { - let namespace = Extension() - namespace.registerTag("set", parser: SetNode.parse) - namespace.registerTag("macro", parser: MacroNode.parse) - namespace.registerTag("call", parser: CallNode.parse) - namespace.registerFilter("swiftIdentifier", filter: StringFilters.stringToSwiftIdentifier) - namespace.registerFilter("join", filter: ArrayFilters.join) - namespace.registerFilter("lowerFirstWord", filter: StringFilters.lowerFirstWord) - namespace.registerFilter("snakeToCamelCase", filter: StringFilters.snakeToCamelCase) - namespace.registerFilter("snakeToCamelCaseNoPrefix", filter: StringFilters.snakeToCamelCaseNoPrefix) - namespace.registerFilter("titlecase", filter: StringFilters.titlecase) - namespace.registerFilter("hexToInt", filter: NumFilters.hexToInt) - namespace.registerFilter("int255toFloat", filter: NumFilters.int255toFloat) - namespace.registerFilter("percent", filter: NumFilters.percent) - namespace.registerFilter("escapeReservedKeywords", filter: StringFilters.escapeReservedKeywords) - return namespace -} - -public func stencilSwiftEnvironment() -> Environment { - return Environment(extensions: [stencilSwiftExtension()], templateClass: SwiftTemplate.self) -} diff --git a/Tests/TestSuites/StoryboardsiOSTests.swift b/Tests/TestSuites/StoryboardsiOSTests.swift index 6f6e279..2be03b6 100644 --- a/Tests/TestSuites/StoryboardsiOSTests.swift +++ b/Tests/TestSuites/StoryboardsiOSTests.swift @@ -5,23 +5,39 @@ // import XCTest +import StencilSwiftKit class StoryboardsiOSTests: XCTestCase { enum Contexts { static let all = ["empty", "all", "customname"] } - + // generate variations to test target module matching static let variations: VariationGenerator = { name, context in guard name == "all" else { return [(context: context, suffix: "")] } - - return [ - (context: context, suffix: ""), - (context: enrich(context, env: ["PRODUCT_MODULE_NAME": "Test"]), suffix: ""), - (context: enrich(context, env: ["PRODUCT_MODULE_NAME": "CustomSegue"]), suffix: "-ignore-module"), - (context: enrich(context, param: ["module": "Test"]), suffix: ""), - (context: enrich(context, param: ["module": "CustomSegue"]), suffix: "-ignore-module") - ] + + do { + return [ + (context: context, + suffix: ""), + (context: try StencilContext.enrich(context: context, + parameters: [], + environment: ["PRODUCT_MODULE_NAME": "Test"]), + suffix: ""), + (context: try StencilContext.enrich(context: context, + parameters: [], + environment: ["PRODUCT_MODULE_NAME": "CustomSegue"]), + suffix: "-ignore-module"), + (context: try StencilContext.enrich(context: context, + parameters: ["module=Test"]), + suffix: ""), + (context: try StencilContext.enrich(context: context, + parameters: ["module=CustomSegue"]), + suffix: "-ignore-module") + ] + } catch { + fatalError("Unable to create context variations") + } } func testDefault() { @@ -55,17 +71,4 @@ class StoryboardsiOSTests: XCTestCase { directory: .storyboardsiOS, contextVariations: StoryboardsiOSTests.variations) } - - private static func enrich(_ context: [String: Any], env: [String: Any]? = nil, param: [String: Any]? = nil) -> [String: Any] { - var result = context - - if let env = env { - result["env"] = env - } - if let param = param { - result["param"] = param - } - - return result - } } diff --git a/Tests/TestsHelper.swift b/Tests/TestsHelper.swift index 33ec44f..16274dd 100644 --- a/Tests/TestsHelper.swift +++ b/Tests/TestsHelper.swift @@ -134,8 +134,8 @@ extension XCTestCase { - Parameter contextVariations: Optional closure to generate context variations. */ func test(template templateName: String, contextNames: [String], outputPrefix: String, directory: Fixtures.Directory, contextVariations: VariationGenerator? = nil) { - let template = SwiftTemplate(templateString: Fixtures.template(for: "\(templateName).stencil"), - environment: stencilSwiftEnvironment()) + let template = StencilSwiftTemplate(templateString: Fixtures.template(for: "\(templateName).stencil"), + environment: stencilSwiftEnvironment()) let contextVariations = contextVariations ?? { [(context: $1, suffix: "")] } for contextName in contextNames {