   var content: String
   var range: Range<String.Index>
 
+  private static let tokenStartDelimiter: Unicode.Scalar = "{"
+  private static let tokenEndDelimiter: Unicode.Scalar = "}"
+
   init(_ content: String) {
     self.originalContent = content
     self.content = content

    return content.isEmpty
  }

  func scan(until: String, returnUntil: Bool = false) -> String {
    var index = content.startIndex

    if until.isEmpty {
      return ""
    }

    range = range.upperBound..<range.upperBound
    while index != content.endIndex {
      let substring = String(content[index...])

      if substring.hasPrefix(until) {
        let result = String(content[..<index])

        if returnUntil {
          range = range.lowerBound..<originalContent.index(range.upperBound, offsetBy: until.count)
          content = String(substring[until.endIndex...])
          return result + until
        }

        content = substring
        return result
      }

      index = content.index(after: index)
      range = range.lowerBound..<originalContent.index(after: range.upperBound)
    }

    content = ""
    return ""
  }

  func scan(until: [String]) -> (String, String)? {
    if until.isEmpty {
      return nil
    }

    var index = content.startIndex
    range = range.upperBound..<range.upperBound
    while index != content.endIndex {
      let substring = String(content[index...])
      for string in until {
        if substring.hasPrefix(string) {
          let result = String(content[..<index])
          content = substring
          return (string, result)
        }
      }

      index = content.index(after: index)
      range = range.lowerBound..<originalContent.index(after: range.upperBound)
    }

    return nil
  }
}


extension String {
  func findFirstNot(character: Character) -> String.Index? {

  func createToken(string: String, at range: Range<String.Index>) -> Token {
    func strip() -> String {
      guard string.count > 4 else { return "" }
      let trimmed = String(string.dropFirst(2).dropLast(2))
        .components(separatedBy: "\n")
        .filter({ !$0.isEmpty })
        .map({ $0.trim(character: " ") })
