Add tokens and token parser
This commit is contained in:
@@ -12,7 +12,7 @@ public protocol Error : Printable {
|
||||
|
||||
}
|
||||
|
||||
public protocol Node : Equatable {
|
||||
public protocol Node {
|
||||
func render(context:Context) -> (String?, Error?)
|
||||
}
|
||||
|
||||
@@ -28,12 +28,8 @@ public class TextNode : Node {
|
||||
}
|
||||
}
|
||||
|
||||
public func ==(lhs:TextNode, rhs:TextNode) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
public class VariableNode : Node {
|
||||
let variable:Variable
|
||||
public let variable:Variable
|
||||
|
||||
public init(variable:Variable) {
|
||||
self.variable = variable
|
||||
@@ -55,7 +51,3 @@ public class VariableNode : Node {
|
||||
return (nil, nil)
|
||||
}
|
||||
}
|
||||
|
||||
public func ==(lhs:VariableNode, rhs:VariableNode) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user