From 20cc95fb87526fc4c030394547e73e195b8336af Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Sun, 18 Oct 2015 15:48:03 +0200 Subject: [PATCH] Made Token's components & contents functions public so we can use it to implement custom tags with registerTag() --- Stencil/Tokenizer.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Stencil/Tokenizer.swift b/Stencil/Tokenizer.swift index 49ebda0..c30e9f8 100644 --- a/Stencil/Tokenizer.swift +++ b/Stencil/Tokenizer.swift @@ -12,7 +12,7 @@ public enum Token : Equatable { case Block(value:String) /// Returns the underlying value as an array seperated by spaces - func components() -> [String] { + public func components() -> [String] { // TODO: Make this smarter and treat quoted strings as a single component let characterSet = NSCharacterSet.whitespaceAndNewlineCharacterSet() @@ -32,7 +32,7 @@ public enum Token : Equatable { } } - var contents:String { + public var contents:String { switch self { case .Block(let value): return value