feat(variable): Allow resolving nodes and resolvables

This commit is contained in:
Kyle Fuller
2016-12-02 00:56:20 +00:00
parent 2e04a71d59
commit 49936c36d4

View File

@@ -99,6 +99,12 @@ public struct Variable : Equatable, Resolvable {
} }
} }
if let resolvable = current as? Resolvable {
current = try resolvable.resolve(context)
} else if let node = current as? NodeType {
current = try node.render(context)
}
return normalize(current) return normalize(current)
} }
} }