From 7c4e39af0704ad64154c36a5331d9130b98cefdb Mon Sep 17 00:00:00 2001 From: iska Date: Fri, 24 Oct 2014 01:07:07 +0200 Subject: [PATCH] Add current location property to Input Stream reader Can be used for better parse errors reporting --- HTMLKit/HTMLInputStreamReader.h | 1 + HTMLKit/HTMLInputStreamReader.m | 1 + 2 files changed, 2 insertions(+) diff --git a/HTMLKit/HTMLInputStreamReader.h b/HTMLKit/HTMLInputStreamReader.h index 0c4d90b..372ce50 100644 --- a/HTMLKit/HTMLInputStreamReader.h +++ b/HTMLKit/HTMLInputStreamReader.h @@ -16,6 +16,7 @@ @interface HTMLInputStreamReader : NSObject @property (nonatomic, readonly) NSString *string; +@property (nonatomic, readonly) NSUInteger currentLocation; @property (nonatomic, copy) HTMLStreamReaderErrorCallback errorCallback; - (id)initWithString:(NSString *)string; diff --git a/HTMLKit/HTMLInputStreamReader.m b/HTMLKit/HTMLInputStreamReader.m index 8e91cb3..9ff56e3 100644 --- a/HTMLKit/HTMLInputStreamReader.m +++ b/HTMLKit/HTMLInputStreamReader.m @@ -26,6 +26,7 @@ @implementation HTMLInputStreamReader @synthesize string = _string; +@synthesize currentLocation = _location; @synthesize errorCallback = _errorCallback; #pragma mark - Lifecycle