diff --git a/HTMLKit.xcodeproj/project.pbxproj b/HTMLKit.xcodeproj/project.pbxproj index 7670334..a4b9be4 100644 --- a/HTMLKit.xcodeproj/project.pbxproj +++ b/HTMLKit.xcodeproj/project.pbxproj @@ -98,6 +98,7 @@ 625A150719C78ABA00AD0C32 /* HTMLInputStreamReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLInputStreamReader.m; sourceTree = ""; }; 625A150B19C78BE900AD0C32 /* HTMLInputStreamReaderErrors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLInputStreamReaderErrors.h; sourceTree = ""; }; 625A150C19C78BE900AD0C32 /* HTMLInputStreamReaderErrors.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLInputStreamReaderErrors.m; sourceTree = ""; }; + 6279F87119E17DC700F12EE5 /* HTMLParserInsertionModes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLParserInsertionModes.h; sourceTree = ""; }; 62E7CAAE19CDFFB500465A83 /* HTMLTokenizerCharacters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HTMLTokenizerCharacters.h; sourceTree = ""; }; 62F873E919E088C90062683C /* HTMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLParser.h; sourceTree = ""; }; 62F873EA19E088C90062683C /* HTMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HTMLParser.m; sourceTree = ""; }; @@ -202,6 +203,7 @@ 624493AB19CD0CBE00BCDDF4 /* HTMLToken.m */, 62F873E919E088C90062683C /* HTMLParser.h */, 62F873EA19E088C90062683C /* HTMLParser.m */, + 6279F87119E17DC700F12EE5 /* HTMLParserInsertionModes.h */, 625A14B619C7829400AD0C32 /* Supporting Files */, ); name = "Source Code"; diff --git a/HTMLKit/HTMLParserInsertionModes.h b/HTMLKit/HTMLParserInsertionModes.h new file mode 100644 index 0000000..7b89ee8 --- /dev/null +++ b/HTMLKit/HTMLParserInsertionModes.h @@ -0,0 +1,39 @@ +// +// HTMLParserInsertionMode.h +// HTMLKit +// +// Created by Iska on 05/10/14. +// Copyright (c) 2014 BrainCookie. All rights reserved. +// + +#define INSERTION_MODES \ + MODE_ENTRY( HTMLInsertionModeInitial, = 0 ) \ + MODE_ENTRY( HTMLInsertionModeBeforeHTML, ) \ + MODE_ENTRY( HTMLInsertionModeBeforeHead, ) \ + MODE_ENTRY( HTMLInsertionModeInHead, ) \ + MODE_ENTRY( HTMLInsertionModeInHeadNoscript, ) \ + MODE_ENTRY( HTMLInsertionModeAfterHead, ) \ + MODE_ENTRY( HTMLInsertionModeInBody, ) \ + MODE_ENTRY( HTMLInsertionModeText, ) \ + MODE_ENTRY( HTMLInsertionModeInTable, ) \ + MODE_ENTRY( HTMLInsertionModeInTableText, ) \ + MODE_ENTRY( HTMLInsertionModeInCaption, ) \ + MODE_ENTRY( HTMLInsertionModeInColumnGroup, ) \ + MODE_ENTRY( HTMLInsertionModeInTableBody, ) \ + MODE_ENTRY( HTMLInsertionModeInRow, ) \ + MODE_ENTRY( HTMLInsertionModeInCell, ) \ + MODE_ENTRY( HTMLInsertionModeInSelect, ) \ + MODE_ENTRY( HTMLInsertionModeInSelectInTable, ) \ + MODE_ENTRY( HTMLInsertionModeInTemplate, ) \ + MODE_ENTRY( HTMLInsertionModeAfterBody, ) \ + MODE_ENTRY( HTMLInsertionModeInFrameset, ) \ + MODE_ENTRY( HTMLInsertionModeAfterFrameset, ) \ + MODE_ENTRY( HTMLInsertionModeAfterAfterBody, ) \ + MODE_ENTRY( HTMLInsertionModeAfterAfterFrameset, ) + +typedef NS_ENUM(NSUInteger, HTMLInsertionMode) +{ +#define MODE_ENTRY( name, value ) name value, + INSERTION_MODES +#undef MODE_ENTRY +};