minor code refactoring

This commit is contained in:
Ilya Puchka
2017-12-27 19:29:17 +01:00
parent 662849e968
commit d6766b43da
5 changed files with 58 additions and 60 deletions

View File

@@ -54,12 +54,7 @@ public class TokenParser {
let node = try parser(self, token)
nodes.append(node)
} catch {
if var error = error as? TemplateSyntaxError {
error.token = error.token ?? token
throw error
} else {
throw error
}
throw error.withToken(token)
}
}
case .comment: