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

@@ -62,7 +62,7 @@ public class VariableNode : NodeType {
let elseExpression: Resolvable?
class func parse(_ parser:TokenParser, token:Token) throws -> NodeType {
var components = token.components()
var components = token.components
func hasToken(_ token: String, at index: Int) -> Bool {
return components.count > (index + 1) && components[index] == token