Convert Token from enum to struct (#256)

* convert Token from enum to struct

* private setter for components

* updated CHANGELOG
This commit is contained in:
Ilya Puchka
2018-09-30 21:48:44 +01:00
committed by GitHub
parent 9a6ba94d7d
commit d9f6a82f97
11 changed files with 62 additions and 54 deletions

View File

@@ -9,7 +9,7 @@ class NowNode : NodeType {
class func parse(_ parser:TokenParser, token:Token) throws -> NodeType {
var format:Variable?
let components = token.components()
let components = token.components
guard components.count <= 2 else {
throw TemplateSyntaxError("'now' tags may only have one argument: the format string.")
}