Fixed missing braces

This commit is contained in:
Łukasz Kuczborski
2021-04-09 23:27:00 +02:00
parent 61919c5e8e
commit 371a4737d9

View File

@@ -48,7 +48,7 @@ public struct Variable: Equatable, Resolvable {
/// Resolve the variable in the given context
public func resolve(_ context: Context) throws -> Any? {
if variable.count > 1 && (variable.hasPrefix("'") && variable.hasSuffix("'")) || (variable.hasPrefix("\"") && variable.hasSuffix("\"")) {
if variable.count > 1 && ((variable.hasPrefix("'") && variable.hasSuffix("'")) || (variable.hasPrefix("\"") && variable.hasSuffix("\""))) {
// String literal
return String(variable[variable.index(after: variable.startIndex) ..< variable.index(before: variable.endIndex)])
} else {