123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- // ReSharper disable once CheckNamespace
- #pragma warning disable
- namespace ExCSS
- {
- internal static class RuleTypes
- {
- internal const string CharacterSet = "charset";
- internal const string Keyframes = "keyframes";
- internal const string Media = "media";
- internal const string Page = "page";
- internal const string Import = "import";
- internal const string FontFace = "font-face";
- internal const string Namespace = "namespace";
- internal const string Supports = "supports";
- internal const string Document = "document";
- }
- internal static class PseudoSelectorPrefix
- {
- internal const string NthChildOdd = "odd";
- internal const string NthChildEven = "even";
- internal const string NthChildN = "n";
- internal const string PseudoFunctionNthchild = "nth-child";
- internal const string PseudoFunctionNthlastchild = "nth-last-child";
- internal const string PseudoFunctionNthOfType = "nth-of-type";
- internal const string PseudoFunctionNthLastOfType = "nth-last-of-type";
- internal const string PseudoRoot = "root";
- internal const string PseudoFirstOfType = "first-of-type";
- internal const string PseudoLastoftype = "last-of-type";
- internal const string PseudoOnlychild = "only-child";
- internal const string PseudoOnlyOfType = "only-of-type";
- internal const string PseudoFirstchild = "first-child";
- internal const string PseudoLastchild = "last-child";
- internal const string PseudoEmpty = "empty";
- internal const string PseudoLink = "link";
- internal const string PseudoVisited = "visited";
- internal const string PseudoActive = "active";
- internal const string PseudoHover = "hover";
- internal const string PseudoFocus = "focus";
- internal const string PseudoTarget = "target";
- internal const string PseudoEnabled = "enabled";
- internal const string PseudoDisabled = "disabled";
- internal const string PseudoChecked = "checked";
- internal const string PseudoUnchecked = "unchecked";
- internal const string PseudoIndeterminate = "indeterminate";
- internal const string PseudoDefault = "default";
- internal const string PseudoValid = "valid";
- internal const string PseudoInvalid = "invalid";
- internal const string PseudoRequired = "required";
- internal const string PseudoInrange = "in-range";
- internal const string PseudoOutofrange = "out-of-range";
- internal const string PseudoOptional = "optional";
- internal const string PseudoReadonly = "read-only";
- internal const string PseudoReadwrite = "read-write";
- internal const string PseudoFunctionDir = "dir";
- internal const string PseudoFunctionNot = "not";
- internal const string PseudoFunctionLang = "lang";
- internal const string PseudoFunctionContains = "contains";
- internal const string PseudoElementBefore = "before";
- internal const string PseudoElementAfter = "after";
- internal const string PseudoElementSelection = "selection";
- internal const string PseudoElementFirstline = "first-line";
- internal const string PseudoElementFirstletter = "first-letter";
- }
- internal static class ErrorMessages
- {
- internal const string InvalidCharacter = "Invalid character detected.";
- internal const string LineBreakEof = "Unexpected line break or EOF.";
- internal const string UnexpectedCommentToken = "The input element is unexpected and has been ignored.";
- internal const string DoubleQuotedString = "Expected double quoted string to terminate before form feed or line feed.";
- internal const string DoubleQuotedStringEof = "Expected double quoted string to terminate before end of file.";
- internal const string SingleQuotedString = "Expected single quoted string to terminate before form feed or line feed.";
- internal const string SingleQuotedStringEof = "Expected single quoted string to terminate before end of file.";
- internal const string InvalidCharacterAfterHash = "Invalid character after #.";
- internal const string InvalidIdentAfterHash = "Invalid character after #.";
- internal const string InvalidUrlEnd = "Expected URL to terminate before line break or end of file.";
- internal const string InvalidUrlQuote = "Expected quotation or open paren in URL.";
- internal const string InvalidUrlCharacter = "Invalid character in URL.";
- internal const string ExpectedCommentEnd = "Expected comment to close before end of file.";
- internal const string Default = "An unexpected error occurred.";
- }
- public enum Combinator
- {
- Child,
- Descendent,
- AdjacentSibling,
- Sibling,
- Namespace
- }
- internal enum GrammarSegment
- {
- String,
- Url,
- UrlPrefix,
- Domain,
- Hash, //#
- AtRule, //@
- Ident,
- Function,
- Number,
- Percentage,
- Dimension,
- Range,
- CommentOpen,
- CommentClose,
- Column,
- Delimiter,
- IncludeMatch, //~=
- DashMatch, // |=
- PrefixMatch, // ^=
- SuffixMatch, // $=
- SubstringMatch, // *=
- NegationMatch, // !=
- ParenOpen,
- ParenClose,
- CurlyBraceOpen,
- CurlyBracketClose,
- SquareBraceOpen,
- SquareBracketClose,
- Colon,
- Comma,
- Semicolon,
- Whitespace
- }
- public enum RuleType
- {
- Unknown = 0,
- Style = 1,
- Charset = 2,
- Import = 3,
- Media = 4,
- FontFace = 5,
- Page = 6,
- Keyframes = 7,
- Keyframe = 8,
- Namespace = 10,
- CounterStyle = 11,
- Supports = 12,
- Document = 13,
- FontFeatureValues = 14,
- Viewport = 15,
- RegionStyle = 16
- }
- public enum UnitType
- {
- Unknown = 0,
- Number = 1,
- Percentage = 2,
- Ems = 3,
- Exs = 4,
- Pixel = 5,
- Centimeter = 6,
- Millimeter = 7,
- Inch = 8,
- Point = 9,
- Percent = 10,
- Degree = 11,
- Radian = 12,
- Grad = 13,
- Millisecond = 14,
- Second = 15,
- Hertz = 16,
- KiloHertz = 17,
- Dimension = 18,
- String = 19,
- Uri = 20,
- Ident = 21,
- Attribute = 22,
- Counter = 23,
- Rect = 24,
- RGB = 25,
- ViewportWidth = 26,
- ViewportHeight = 28,
- ViewportMin = 29,
- ViewportMax = 30,
- Turn = 31,
- }
- public enum DocumentFunction
- {
- Url,
- UrlPrefix,
- Domain,
- RegExp
- }
- public enum DirectionMode
- {
- LeftToRight,
- RightToLeft
- }
- public enum ParserError
- {
- EndOfFile,
- UnexpectedLineBreak,
- InvalidCharacter,
- UnexpectedCommentToken
- }
- internal enum SelectorOperation
- {
- Data,
- Attribute,
- AttributeOperator,
- AttributeValue,
- AttributeEnd,
- Class,
- PseudoClass,
- PseudoClassFunction,
- PseudoClassFunctionEnd,
- PseudoElement
- }
- internal enum ParsingContext
- {
- DataBlock,
- InSelector,
- InDeclaration,
- AfterProperty,
- BeforeValue,
- InValuePool,
- InValueList,
- InSingleValue,
- InMediaList,
- InMediaValue,
- BeforeImport,
- BeforeCharset,
- BeforeNamespacePrefix,
- AfterNamespacePrefix,
- BeforeFontFace,
- FontfaceData,
- FontfaceProperty,
- AfterInstruction,
- InCondition,
- BeforeKeyframesName,
- BeforeKeyframesData,
- KeyframesData,
- InKeyframeText,
- BeforePageSelector,
- BeforeDocumentFunction,
- InDocumentFunction,
- AfterDocumentFunction,
- BetweenDocumentFunctions,
- InUnknown,
- ValueImportant,
- AfterValue,
- InHexValue,
- InFunction
- }
- }
- #pragma warning restore
|