From c8b331d2b2274afdf12c3dff1d782499200f04a2 Mon Sep 17 00:00:00 2001 From: Sam Soffes Date: Sun, 14 Jun 2015 22:56:08 -0700 Subject: [PATCH] Update comments --- SyntaxKit.xcodeproj/project.pbxproj | 18 +- SyntaxKit/Sources/AttributedParser.swift | 192 ++++++++++++---------- SyntaxKit/Sources/Capture.swift | 10 +- SyntaxKit/Sources/CaptureCollection.swift | 12 +- SyntaxKit/Sources/Language.swift | 8 +- SyntaxKit/Sources/Parser.swift | 68 ++++---- SyntaxKit/Sources/Pattern.swift | 39 ++--- SyntaxKit/Sources/Result.swift | 21 ++- SyntaxKit/Sources/ResultSet.swift | 95 +++++------ SyntaxKit/Sources/SyntaxKit.h | 4 +- SyntaxKit/Sources/Theme.swift | 4 +- SyntaxKit/Tests/LanguageTests.swift | 6 +- SyntaxKit/Tests/ParserTests.swift | 4 +- 13 files changed, 244 insertions(+), 237 deletions(-) diff --git a/SyntaxKit.xcodeproj/project.pbxproj b/SyntaxKit.xcodeproj/project.pbxproj index 2503780..2db318e 100644 --- a/SyntaxKit.xcodeproj/project.pbxproj +++ b/SyntaxKit.xcodeproj/project.pbxproj @@ -86,13 +86,9 @@ 210299CB1B2E8924009C61EE /* SyntaxKit.h */, 210299C81B2E8924009C61EE /* Parser.swift */, 210299C41B2E8924009C61EE /* AttributedParser.swift */, - 210299C51B2E8924009C61EE /* Capture.swift */, - 210299C61B2E8924009C61EE /* CaptureCollection.swift */, 210299C71B2E8924009C61EE /* Language.swift */, - 210299C91B2E8924009C61EE /* Pattern.swift */, - 210299CA1B2E8924009C61EE /* Result.swift */, - 210299E71B2E929C009C61EE /* ResultSet.swift */, 210299CC1B2E8924009C61EE /* Theme.swift */, + 2119897B1B2E99CC00F0D786 /* Internal */, ); path = Sources; sourceTree = ""; @@ -124,6 +120,18 @@ path = Fixtures; sourceTree = ""; }; + 2119897B1B2E99CC00F0D786 /* Internal */ = { + isa = PBXGroup; + children = ( + 210299C91B2E8924009C61EE /* Pattern.swift */, + 210299C51B2E8924009C61EE /* Capture.swift */, + 210299C61B2E8924009C61EE /* CaptureCollection.swift */, + 210299CA1B2E8924009C61EE /* Result.swift */, + 210299E71B2E929C009C61EE /* ResultSet.swift */, + ); + name = Internal; + sourceTree = ""; + }; 2122A6D41B22B9320006409B = { isa = PBXGroup; children = ( diff --git a/SyntaxKit/Sources/AttributedParser.swift b/SyntaxKit/Sources/AttributedParser.swift index 9d80d6d..22cc75d 100644 --- a/SyntaxKit/Sources/AttributedParser.swift +++ b/SyntaxKit/Sources/AttributedParser.swift @@ -2,136 +2,158 @@ // AttributedParser.swift // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 9/24/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // public class AttributedParser: Parser { -// - (instancetype)initWithLanguageName:(NSString *)languageName { -// if ((self = [super init])) { -// self.language = [SYNLanguage languageWithName:languageName]; +// #pragma mark - Accessors +// +// @synthesize baseAttributes = _baseAttributes; +// @synthesize attributes = _attributes; +// @synthesize fontFamily = _fontFamily; +// +// - (void)setTheme:(SYNTheme *)theme { +// _theme = theme; +// [self updateTheme]; +// } +// // -// if (!self.language) { -// return (self = nil); +// - (void)setFontFamily:(NOMFontFamily *)fontFamily { +// _fontFamily = fontFamily; +// [self updateTheme]; // } +// +// +// #pragma mark - Initializers +// +// - (instancetype)initWithLanguageName:(NSString *)languageName themeName:(NSString *)themeName { +// if ((self = [super initWithLanguageName:languageName])) { +// self.attributes = [[NSMutableDictionary alloc] init]; +// self.theme = [SYNTheme themeWithName:themeName]; // } // return self; // } // // -// - (void)parse:(NSString *)string match:(SYNParserMatchCallback)callback { -// NSParameterAssert(string); -// NSParameterAssert(callback); +// - (instancetype)initWithLanguageName:(NSString *)languageName { +// return (self = [self initWithLanguageName:languageName themeName:nil]); +// } // -// // Loop through paragraphs -// NSUInteger length = [string length]; -// NSUInteger paragraphStart = 0; -// NSUInteger paragraphEnd = 0; -// NSUInteger contentsEnd = 0; -// while (paragraphEnd < length) { -// [string getParagraphStart:¶graphStart end:¶graphEnd -// contentsEnd:&contentsEnd forRange:NSMakeRange(paragraphEnd, 0)]; -// NSRange paragraphRange = NSMakeRange(paragraphStart, contentsEnd - paragraphStart); -// NSUInteger limit = NSMaxRange(paragraphRange); -// NSRange range = paragraphRange; // -// // Loop through the line until we reach the end -// while (range.length > 0 && range.location < limit) { -// NSUInteger location = [self parse:string inRange:range callback:callback]; -// range.location = location; -// range.length = fmax(0, range.length - paragraphRange.location - range.location); -// } -// } +// - (void)setAttributes:(NSDictionary *)attributes forScope:(NSString *)scope { +// self.attributes[scope] = attributes; // } // // -// #pragma mark - Private +// #pragma mark - Parsing // -// // Returns new location -// - (NSUInteger)parse:(NSString *)string inRange:(NSRange)bounds callback:(SYNParserMatchCallback)callback { -// for (SYNPattern *pattern in self.language.patterns) { -// // Single pattern -// if (pattern.match) { -// SYNResultSet *resultSet = [self parse:string inRange:bounds scope:pattern.name expression:pattern.match captures:pattern.captures]; -// if (!resultSet) { -// continue; +// - (void)parse:(NSString *)string attributedMatch:(SYNAttributedParserMatchCallback)match { +// [self parse:string match:^(NSString *scope, NSRange range) { +// NSDictionary *attributes = [self attributesForScope:scope]; +// if (attributes) { +// match(scope, range, attributes); // } -// return [self applyResults:resultSet callback:callback]; +// }]; // } // -// // Begin & end -// if (pattern.begin && pattern.end) { -// SYNResultSet *begin = [self parse:string inRange:bounds scope:nil expression:pattern.begin captures:pattern.beginCaptures]; -// if (!begin) { -// continue; -// } // -// NSRange endRange = bounds; -// endRange.location = NSMaxRange(begin.range); -// endRange.length -= endRange.location - bounds.location; +// #pragma mark - Attributes // -// SYNResultSet *end = [self parse:string inRange:endRange scope:nil expression:pattern.end captures:pattern.endCaptures]; -// if (!end) { -// // TODO: Rewind? -// continue; +// - (NSDictionary *)attributesForScope:(NSString *)scope { +// if (!scope) { +// return nil; // } // -// SYNResultSet *resultSet = [[SYNResultSet alloc] init]; +// NSMutableDictionary *attributes = [[NSMutableDictionary alloc] init]; +// NSArray *components = [scope componentsSeparatedByString:@"."]; // -// // Add whole scope before start and end -// if (pattern.name) { -// [resultSet addResultWithScope:pattern.name range:NSUnionRange(begin.range, end.range)]; +// NSUInteger count = [components count]; +// if (count == 0) { +// return nil; // } // -// [resultSet addResultsFromResultSet:begin]; -// [resultSet addResultsFromResultSet:end]; +// for (NSUInteger i = 0; i < count; i++) { +// NSString *key = [[components subarrayWithRange:NSMakeRange(0, count - 1 - i)] componentsJoinedByString:@"."]; +// [attributes addEntriesFromDictionary:self.attributes[key]]; +// } // -// return [self applyResults:resultSet callback:callback]; +// if ([attributes count] == 0) { +// return nil; // } +// +// return attributes; // } // -// return NSMaxRange(bounds); +// +// - (void)removeAttributesForScope:(NSString *)scope { +// [self.attributes removeObjectForKey:scope]; // } // // -// // Parse an expression with captures -// - (SYNResultSet *)parse:(NSString *)string inRange:(NSRange)bounds scope:(NSString *)scope expression:(NSString *)pattern captures:(SYNCaptureCollection *)captures { -// NSRegularExpression *expression = [[NSRegularExpression alloc] initWithPattern:pattern options:NSRegularExpressionAnchorsMatchLines error:nil]; -// NSArray *matches = [expression matchesInString:string options:kNilOptions range:bounds]; -// NSTextCheckingResult *result = [matches firstObject]; -// if (!result) { -// return nil; +// - (NSAttributedString *)attributedStringForString:(NSString *)string { +// NSMutableAttributedString *output = [[NSMutableAttributedString alloc] initWithString:string attributes:self.baseAttributes]; +// +// [self parse:string match:^(NSString *scope, NSRange range) { +// NSDictionary *attributes = [self attributesForScope:scope]; +// if (attributes) { +// [output addAttributes:attributes range:range]; // } +// }]; // -// SYNResultSet *resultSet = [[SYNResultSet alloc] init]; -// if (scope && result.range.location != NSNotFound) { -// [resultSet addResultWithScope:scope range:result.range]; +// return output; // } // -// for (NSNumber *index in [captures captureIndexes]) { -// NSRange range = [result rangeAtIndex:[index integerValue]]; -// if (range.location == NSNotFound) { +// +// #pragma mark - Private +// +// - (void)updateTheme { +// for (NSDictionary *item in self.theme.settings) { +// NSString *scopes = item[@"scope"]; +// NSDictionary *settings = item[@"settings"]; +// NSDictionary *attributes = [self attributesFromSettings:settings]; +// if (!scopes) { +// [self setBaseAttributes:attributes]; // continue; // } // -// scope = [[captures captureAtIndex:[index integerValue]] name]; -// [resultSet addResultWithScope:scope range:range]; +// NSArray *components = [scopes componentsSeparatedByString:@","]; +// for (NSString *component in components) { +// NSString *scope = [component stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; +// [self setAttributes:attributes forScope:scope]; // } -// -// if (![resultSet isEmpty]) { -// return resultSet; // } -// -// return nil; // } // +// - (NSDictionary *)attributesFromSettings:(NSDictionary *)settings { +// static NSDictionary *map; +// static dispatch_once_t onceToken; +// dispatch_once(&onceToken, ^{ +// map = @{ +// @"foreground": NSForegroundColorAttributeName, +// @"background": NSBackgroundColorAttributeName +// // TODO: caret, invisibles, lightHighlight, selection +// }; +// }); // -// - (NSUInteger)applyResults:(SYNResultSet *)resultSet callback:(SYNParserMatchCallback)callback { -// NSUInteger max = 0; -// for (SYNResult *result in resultSet.results) { -// callback(result.scope, result.range); -// max = fmax(NSMaxRange(result.range), max); +// NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithCapacity:[settings count]]; +// for (NSString *key in settings) { +// NSString *name = map[key]; +// if (name) { +// attributes[name] = [NOMColor colorWithHex:settings[key]]; +// continue; +// } +// +// if (self.fontFamily && [key isEqualToString:@"fontStyle"]) { +// NSString *value = settings[key]; +// if ([value isEqualToString:@"italic"]) { +// NOMFont *font = [self.fontFamily fontForStyle:NOMFontStyleItalic]; +// if (font) { +// attributes[NSFontAttributeName] = font; +// } +// } +// } // } -// return max; +// return attributes; // } } diff --git a/SyntaxKit/Sources/Capture.swift b/SyntaxKit/Sources/Capture.swift index 8776143..368b104 100644 --- a/SyntaxKit/Sources/Capture.swift +++ b/SyntaxKit/Sources/Capture.swift @@ -2,22 +2,22 @@ // Capture.swift // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 9/18/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import Foundation -public struct Capture { +struct Capture { // MARK: - Properties - public let name: String + let name: String // MARK: - Initializers - public init?(dictionary: [NSObject: AnyObject]) { + init?(dictionary: [NSObject: AnyObject]) { guard let name = dictionary["name"] as? String else { return nil } self.name = name } diff --git a/SyntaxKit/Sources/CaptureCollection.swift b/SyntaxKit/Sources/CaptureCollection.swift index c8e1499..1b73606 100644 --- a/SyntaxKit/Sources/CaptureCollection.swift +++ b/SyntaxKit/Sources/CaptureCollection.swift @@ -2,19 +2,19 @@ // CaptureCollection.swift // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 9/19/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import Foundation -public struct CaptureCollection { +struct CaptureCollection { // MARK: - Properties private let captures: [UInt: Capture] - public var captureIndexes: [UInt] { + var captureIndexes: [UInt] { var keys = captures.keys.array keys.sortInPlace() { $0 < $1 } return keys @@ -23,7 +23,7 @@ public struct CaptureCollection { // MARK: - Initializers - public init?(dictionary: [NSObject: AnyObject]) { + init?(dictionary: [NSObject: AnyObject]) { guard let dictionary = dictionary as? [String: [String: String]] else { return nil } var captures = [UInt: Capture]() @@ -38,7 +38,7 @@ public struct CaptureCollection { // MARK: - Accessing Captures - public subscript(index: UInt) -> Capture? { + subscript(index: UInt) -> Capture? { return captures[index] } } diff --git a/SyntaxKit/Sources/Language.swift b/SyntaxKit/Sources/Language.swift index 1360ef3..790c8a5 100644 --- a/SyntaxKit/Sources/Language.swift +++ b/SyntaxKit/Sources/Language.swift @@ -2,13 +2,13 @@ // Language.swift // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 9/18/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import Foundation -public typealias Repository = [String: Pattern] +typealias Repository = [String: Pattern] public struct Language { // #pragma mark - Factory @@ -58,7 +58,7 @@ public struct Language { public let UUID: String public let name: String public let scopeName: String - public let patterns: [Pattern] + let patterns: [Pattern] // MARK: - Initializers diff --git a/SyntaxKit/Sources/Parser.swift b/SyntaxKit/Sources/Parser.swift index fc914c2..1d3a522 100644 --- a/SyntaxKit/Sources/Parser.swift +++ b/SyntaxKit/Sources/Parser.swift @@ -2,8 +2,8 @@ // Parser.swift // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 9/19/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import Foundation @@ -66,35 +66,29 @@ public class Parser { } else { continue } + } -// // Begin & end -// if (pattern.begin && pattern.end) { -// SYNResultSet *begin = [self parse:string inRange:bounds scope:nil expression:pattern.begin captures:pattern.beginCaptures]; -// if (!begin) { -// continue; -// } -// -// NSRange endRange = bounds; -// endRange.location = NSMaxRange(begin.range); -// endRange.length -= endRange.location - bounds.location; -// -// SYNResultSet *end = [self parse:string inRange:endRange scope:nil expression:pattern.end captures:pattern.endCaptures]; -// if (!end) { -// // TODO: Rewind? -// continue; -// } -// -// SYNResultSet *resultSet = [[SYNResultSet alloc] init]; -// -// // Add whole scope before start and end -// if (pattern.name) { -// [resultSet addResultWithScope:pattern.name range:NSUnionRange(begin.range, end.range)]; -// } -// -// [resultSet addResultsFromResultSet:begin]; -// [resultSet addResultsFromResultSet:end]; -// -// return [self applyResults:resultSet callback:callback]; + // Begin & end + if let begin = pattern.begin, end = pattern.end { + guard let beginResults = parse(string, inRange: bounds, expression: begin, captures: pattern.beginCaptures), + beginRange = beginResults.range else { continue } + + let location = NSMaxRange(beginRange) + let endBounds = NSMakeRange(location, bounds.length - location - bounds.location) + + guard let endResults = parse(string, inRange: endBounds, expression: end, captures: pattern.endCaptures), + endRange = endResults.range else { /* TODO: Rewind? */ continue } + + // Add whole scope before start and end + var results = ResultSet() + if let name = pattern.name { + results.addResult(Result(scope: name, range: NSUnionRange(beginRange, endRange))) + } + + results.addResults(beginResults) + results.addResults(endResults) + + return applyResults(results, callback: callback) } } @@ -102,7 +96,7 @@ public class Parser { } /// Parse an expression with captures - private func parse(string: String, inRange bounds: NSRange, scope: String, expression expressionString: String, captures: CaptureCollection?) -> ResultSet? { + private func parse(string: String, inRange bounds: NSRange, scope: String? = nil, expression expressionString: String, captures: CaptureCollection?) -> ResultSet? { // NSRegularExpression *expression = [[NSRegularExpression alloc] initWithPattern:pattern options:NSRegularExpressionAnchorsMatchLines error:nil]; // NSArray *matches = [expression matchesInString:string options:kNilOptions range:bounds]; // NSTextCheckingResult *result = [matches firstObject]; @@ -133,11 +127,11 @@ public class Parser { } private func applyResults(resultSet: ResultSet, callback: Callback) -> UInt { - let max: UInt = 0 -// for result in resultSet.results { -// callback(result.scope, result.range) -// max = max(NSMaxRange(result.range), max) -// } - return max + var i = 0 + for result in resultSet.results { + callback(scope: result.scope, range: result.range) + i = max(NSMaxRange(result.range), i) + } + return UInt(i) } } diff --git a/SyntaxKit/Sources/Pattern.swift b/SyntaxKit/Sources/Pattern.swift index 0ff1a96..fe17cd4 100644 --- a/SyntaxKit/Sources/Pattern.swift +++ b/SyntaxKit/Sources/Pattern.swift @@ -2,13 +2,13 @@ // Pattern.swift // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 9/18/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import Foundation -public final class Pattern { +final class Pattern { // + (instancetype)patternWithDictionary:(NSDictionary *)dictionary language:(SYNLanguage *)language { // NSString *include = dictionary[@"include"]; // if (include) { @@ -22,39 +22,32 @@ public final class Pattern { // MARK: - Properties - public let name: String - public let match: String? - public let beginCaptures: CaptureCollection? - public let captures: CaptureCollection? - public let endCaptures: CaptureCollection? + let name: String? + let match: String? + let captures: CaptureCollection? + let begin: String? + let beginCaptures: CaptureCollection? + let end: String? + let endCaptures: CaptureCollection? private weak var parent: Pattern? private let patterns: [Pattern] - public var superpattern: Pattern? { + var superpattern: Pattern? { return parent } - public var subpatterns: [Pattern] { + var subpatterns: [Pattern] { return patterns } // MARK: - Initializers - public init?(dictionary: [NSObject: AnyObject], parent: Pattern? = nil) { - guard let name = dictionary["name"] as? String else { - self.name = "" - self.match = nil - self.beginCaptures = nil - self.captures = nil - self.endCaptures = nil - self.parent = nil - self.patterns = [Pattern]() - return nil - } - + init?(dictionary: [NSObject: AnyObject], parent: Pattern? = nil) { self.parent = parent - self.name = name + self.name = dictionary["name"] as? String self.match = dictionary["match"] as? String + self.begin = dictionary["begin"] as? String + self.end = dictionary["end"] as? String if let dictionary = dictionary["beginCaptures"] as? [NSObject: AnyObject] { self.beginCaptures = CaptureCollection(dictionary: dictionary) diff --git a/SyntaxKit/Sources/Result.swift b/SyntaxKit/Sources/Result.swift index 74c65ac..be1a604 100644 --- a/SyntaxKit/Sources/Result.swift +++ b/SyntaxKit/Sources/Result.swift @@ -2,13 +2,24 @@ // Result.swift // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 10/11/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import Foundation -public struct Result { - public let scope: String - public let range: NSRange +struct Result { + + // MARK: - Properties + + let scope: String + let range: NSRange + + + // MARK: - Initializers + + init(scope: String, range: NSRange) { + self.scope = scope + self.range = range + } } diff --git a/SyntaxKit/Sources/ResultSet.swift b/SyntaxKit/Sources/ResultSet.swift index b4239c2..77f190e 100644 --- a/SyntaxKit/Sources/ResultSet.swift +++ b/SyntaxKit/Sources/ResultSet.swift @@ -2,65 +2,44 @@ // ResultSet.swift // SyntaxKit // -// Created by Sam Soffes on 6/14/15. -// Copyright © 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 10/11/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import Foundation -public struct ResultSet { -// @synthesize results = _results; -// @synthesize range = _range; -// -// -// - (instancetype)init { -// if ((self = [super init])) { -// self.range = NSMakeRange(NSNotFound, 0); -// } -// return self; -// } -// -// -// - (void)addResult:(SYNResult *)result { -// if (!result) { -// return; -// } -// -// if (!_results) { -// _results = [[NSMutableArray alloc] init]; -// } -// -// [(NSMutableArray *)_results addObject:result]; -// -// NSInteger location = self.range.location; -// if (location == NSNotFound) { -// self.range = result.range; -// return; -// } -// -// // Assume these are added in the correct order for performance -// self.range = NSMakeRange(location, NSMaxRange(result.range) - location); -// } -// -// -// - (void)addResultsFromResultSet:(SYNResultSet *)resultSet { -// NSRange range = self.range; -// for (SYNResult *result in resultSet.results) { -// [self addResult:result]; -// } -// self.range = NSUnionRange(range, resultSet.range); -// } -// -// -// - (void)addResultWithScope:(NSString *)scope range:(NSRange)range { -// SYNResult *result = [[SYNResult alloc] init]; -// result.scope = scope; -// result.range = range; -// [self addResult:result]; -// } -// -// -// - (BOOL)isEmpty { -// return [self.results count] == 0; -// } -} \ No newline at end of file +struct ResultSet { + + // MARK: - Properties + + private var _results = [Result]() + var results: [Result] { + return _results + } + + var range: NSRange? + + var isEmpty: Bool { + return results.count == 0 + } + + + // MARK: - Adding + + mutating func addResult(result: Result) { + _results.append(result) + + guard let range = range else { + self.range = result.range + return + } + + self.range = NSUnionRange(range, result.range) + } + + mutating func addResults(resultSet: ResultSet) { + for result in resultSet.results { + addResult(result) + } + } +} diff --git a/SyntaxKit/Sources/SyntaxKit.h b/SyntaxKit/Sources/SyntaxKit.h index 5e07d08..72a44a4 100644 --- a/SyntaxKit/Sources/SyntaxKit.h +++ b/SyntaxKit/Sources/SyntaxKit.h @@ -2,8 +2,8 @@ // SyntaxKit.h // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 9/18/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // @import Foundation; diff --git a/SyntaxKit/Sources/Theme.swift b/SyntaxKit/Sources/Theme.swift index cf9ee61..2921f04 100644 --- a/SyntaxKit/Sources/Theme.swift +++ b/SyntaxKit/Sources/Theme.swift @@ -2,8 +2,8 @@ // Theme.swift // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 10/11/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import Foundation diff --git a/SyntaxKit/Tests/LanguageTests.swift b/SyntaxKit/Tests/LanguageTests.swift index 5ec7e6c..463c570 100644 --- a/SyntaxKit/Tests/LanguageTests.swift +++ b/SyntaxKit/Tests/LanguageTests.swift @@ -2,12 +2,12 @@ // LanguageTests.swift // SyntaxKit // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 9/18/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import XCTest -import SyntaxKit +@testable import SyntaxKit class LanguageTests: XCTestCase { diff --git a/SyntaxKit/Tests/ParserTests.swift b/SyntaxKit/Tests/ParserTests.swift index a8c9de5..8c4c936 100644 --- a/SyntaxKit/Tests/ParserTests.swift +++ b/SyntaxKit/Tests/ParserTests.swift @@ -2,8 +2,8 @@ // SyntaxKitTests.swift // SyntaxKitTests // -// Created by Sam Soffes on 6/5/15. -// Copyright (c) 2015 Sam Soffes. All rights reserved. +// Created by Sam Soffes on 9/19/14. +// Copyright © 2014-2015 Sam Soffes. All rights reserved. // import XCTest