Skip to content

Commit

Permalink
Update SoulverCore framework (v2.5.0)
Browse files Browse the repository at this point in the history
Compiled with Xcode 15.2 and Swift 5.9.2
  • Loading branch information
zcohan committed Feb 20, 2024
1 parent 1561c8e commit e7270fe
Show file tree
Hide file tree
Showing 2,413 changed files with 42,468 additions and 33,472 deletions.
25 changes: 2 additions & 23 deletions MacSample/MacSample/SoulverCoreExamples.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class SoulverCoreExamples {
SoulverCoreExamples().enablingAutomaticResultConversion()
SoulverCoreExamples().creatingACustomUnit()
SoulverCoreExamples().usingAEuropeanLocale()
SoulverCoreExamples().disablingBracketComments()
SoulverCoreExamples().customizingHowAmbiguousExpressionsAreHandled()
SoulverCoreExamples().findingADate()
SoulverCoreExamples().gettingMetadataAboutAnExpression()
Expand Down Expand Up @@ -169,6 +168,7 @@ class SoulverCoreExamples {
// Provide a European locale where the decimal character is set to a ","

let europeanLocale = Locale(identifier: "en_DE")

let customization = EngineCustomization.standard.convertTo(locale: europeanLocale)

let calculator = Calculator(customization: customization)
Expand All @@ -178,28 +178,7 @@ class SoulverCoreExamples {
print(result.stringValue) // 4,6

}

func disablingBracketComments() {

// An engine customization includes a list of feature flags that can be toggled to change calculator behaviour

// SoulverCore has a feature called bracket comments, which instructs the calculator to ignore single numbers in brackets.

// If we want to return to a more traditional evaluation style, we need to set the feature flags property on the customization

var flags = EngineFeatureFlags()
flags.bracketComments = false

var customization: EngineCustomization = .standard
customization.featureFlags = flags

let calculator = Calculator(customization: customization)
let result = calculator.calculate("5 (10)")
print(result.stringValue) // 50
}




func customizingHowAmbiguousExpressionsAreHandled() {

// When faced with an ambiguous expression, like "123 456", SoulverCore will (by default) select the last number as the answer.
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let package = Package(
targets: [
.binaryTarget(
name: "SoulverCore",
url: "https://github.com/soulverteam/SoulverCore/releases/download/2.4.7/SoulverCore.xcframework.zip",
checksum: "44bae8eda439988e5d782b0ac81c595b66662f8d569f29af46413e3152917d86"),
url: "https://github.com/soulverteam/SoulverCore/releases/download/2.5.0/SoulverCore.xcframework.zip",
checksum: "b31998d3bcabe0aa694540e085ef0635075da951fd23841603b2269a9d2e1bbd"),
]
)
14 changes: 7 additions & 7 deletions SoulverCore.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,32 @@
</dict>
<dict>
<key>BinaryPath</key>
<string>SoulverCore.framework/SoulverCore</string>
<string>SoulverCore.framework/Versions/A/SoulverCore</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>SoulverCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<string>macos</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>SoulverCore.framework/Versions/A/SoulverCore</string>
<string>SoulverCore.framework/SoulverCore</string>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>SoulverCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
<string>ios</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ SWIFT_CLASS("_TtC11SoulverCore41DependenciesEvaluationAndMergingOperation")
#endif
#if __has_attribute(external_source_symbol)
# pragma clang attribute pop
Expand Down
Binary file not shown.
Loading

0 comments on commit e7270fe

Please sign in to comment.