Refactor HTML Tokens into separate files

This commit is contained in:
iska
2014-10-23 23:52:43 +02:00
parent 98357f9d4b
commit 5d3ea61a04
16 changed files with 460 additions and 146 deletions
+40
View File
@@ -0,0 +1,40 @@
//
// HTMLCharacterToken.m
// HTMLKit
//
// Created by Iska on 23/10/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import "HTMLCharacterToken.h"
@interface HTMLCharacterToken ()
{
#warning Find a better solution. Single characters vs String of multiple characters
UTF32Char _character;
NSString *_characters;
}
@end
@implementation HTMLCharacterToken
- (instancetype)initWithCharacter:(UTF32Char)character
{
self = [super init];
if (self) {
self.type = HTMLTokenTypeCharacter;
_character = character;
}
return self;
}
- (instancetype)initWithString:(NSString *)string
{
self = [super init];
if (self) {
_characters = [string copy];
}
return self;
}
@end