Create lexer and template

This commit is contained in:
Kyle Fuller
2014-10-24 14:25:53 +01:00
parent bf67ea3e5f
commit 652a4f9c88
7 changed files with 110 additions and 3 deletions

21
Stencil/Lexer.swift Normal file
View File

@@ -0,0 +1,21 @@
//
// Lexer.swift
// Stencil
//
// Created by Kyle Fuller on 24/10/2014.
// Copyright (c) 2014 Cocode. All rights reserved.
//
import Foundation
public struct Lexer {
public let templateString:String
public init(templateString:String) {
self.templateString = templateString
}
public func tokenize() -> [Token] {
return [Token.Text(value: templateString)]
}
}