replaced Lexeme protocol with Token

This commit is contained in:
Ilya Puchka
2017-12-26 15:28:46 +01:00
parent 218822fcb0
commit 8d68edd725
7 changed files with 35 additions and 54 deletions

View File

@@ -16,7 +16,7 @@ public func renderNodes(_ nodes:[NodeType], _ context:Context) throws -> String
return try $0.render(context)
} catch {
if var error = error as? TemplateSyntaxError {
error.lexeme = error.lexeme ?? $0.token
error.token = error.token ?? $0.token
throw error
} else {
throw error