Enumerations.cs 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. // ReSharper disable once CheckNamespace
  2. #pragma warning disable
  3. namespace ExCSS
  4. {
  5. internal static class RuleTypes
  6. {
  7. internal const string CharacterSet = "charset";
  8. internal const string Keyframes = "keyframes";
  9. internal const string Media = "media";
  10. internal const string Page = "page";
  11. internal const string Import = "import";
  12. internal const string FontFace = "font-face";
  13. internal const string Namespace = "namespace";
  14. internal const string Supports = "supports";
  15. internal const string Document = "document";
  16. }
  17. internal static class PseudoSelectorPrefix
  18. {
  19. internal const string NthChildOdd = "odd";
  20. internal const string NthChildEven = "even";
  21. internal const string NthChildN = "n";
  22. internal const string PseudoFunctionNthchild = "nth-child";
  23. internal const string PseudoFunctionNthlastchild = "nth-last-child";
  24. internal const string PseudoFunctionNthOfType = "nth-of-type";
  25. internal const string PseudoFunctionNthLastOfType = "nth-last-of-type";
  26. internal const string PseudoRoot = "root";
  27. internal const string PseudoFirstOfType = "first-of-type";
  28. internal const string PseudoLastoftype = "last-of-type";
  29. internal const string PseudoOnlychild = "only-child";
  30. internal const string PseudoOnlyOfType = "only-of-type";
  31. internal const string PseudoFirstchild = "first-child";
  32. internal const string PseudoLastchild = "last-child";
  33. internal const string PseudoEmpty = "empty";
  34. internal const string PseudoLink = "link";
  35. internal const string PseudoVisited = "visited";
  36. internal const string PseudoActive = "active";
  37. internal const string PseudoHover = "hover";
  38. internal const string PseudoFocus = "focus";
  39. internal const string PseudoTarget = "target";
  40. internal const string PseudoEnabled = "enabled";
  41. internal const string PseudoDisabled = "disabled";
  42. internal const string PseudoChecked = "checked";
  43. internal const string PseudoUnchecked = "unchecked";
  44. internal const string PseudoIndeterminate = "indeterminate";
  45. internal const string PseudoDefault = "default";
  46. internal const string PseudoValid = "valid";
  47. internal const string PseudoInvalid = "invalid";
  48. internal const string PseudoRequired = "required";
  49. internal const string PseudoInrange = "in-range";
  50. internal const string PseudoOutofrange = "out-of-range";
  51. internal const string PseudoOptional = "optional";
  52. internal const string PseudoReadonly = "read-only";
  53. internal const string PseudoReadwrite = "read-write";
  54. internal const string PseudoFunctionDir = "dir";
  55. internal const string PseudoFunctionNot = "not";
  56. internal const string PseudoFunctionLang = "lang";
  57. internal const string PseudoFunctionContains = "contains";
  58. internal const string PseudoElementBefore = "before";
  59. internal const string PseudoElementAfter = "after";
  60. internal const string PseudoElementSelection = "selection";
  61. internal const string PseudoElementFirstline = "first-line";
  62. internal const string PseudoElementFirstletter = "first-letter";
  63. }
  64. internal static class ErrorMessages
  65. {
  66. internal const string InvalidCharacter = "Invalid character detected.";
  67. internal const string LineBreakEof = "Unexpected line break or EOF.";
  68. internal const string UnexpectedCommentToken = "The input element is unexpected and has been ignored.";
  69. internal const string DoubleQuotedString = "Expected double quoted string to terminate before form feed or line feed.";
  70. internal const string DoubleQuotedStringEof = "Expected double quoted string to terminate before end of file.";
  71. internal const string SingleQuotedString = "Expected single quoted string to terminate before form feed or line feed.";
  72. internal const string SingleQuotedStringEof = "Expected single quoted string to terminate before end of file.";
  73. internal const string InvalidCharacterAfterHash = "Invalid character after #.";
  74. internal const string InvalidIdentAfterHash = "Invalid character after #.";
  75. internal const string InvalidUrlEnd = "Expected URL to terminate before line break or end of file.";
  76. internal const string InvalidUrlQuote = "Expected quotation or open paren in URL.";
  77. internal const string InvalidUrlCharacter = "Invalid character in URL.";
  78. internal const string ExpectedCommentEnd = "Expected comment to close before end of file.";
  79. internal const string Default = "An unexpected error occurred.";
  80. }
  81. public enum Combinator
  82. {
  83. Child,
  84. Descendent,
  85. AdjacentSibling,
  86. Sibling,
  87. Namespace
  88. }
  89. internal enum GrammarSegment
  90. {
  91. String,
  92. Url,
  93. UrlPrefix,
  94. Domain,
  95. Hash, //#
  96. AtRule, //@
  97. Ident,
  98. Function,
  99. Number,
  100. Percentage,
  101. Dimension,
  102. Range,
  103. CommentOpen,
  104. CommentClose,
  105. Column,
  106. Delimiter,
  107. IncludeMatch, //~=
  108. DashMatch, // |=
  109. PrefixMatch, // ^=
  110. SuffixMatch, // $=
  111. SubstringMatch, // *=
  112. NegationMatch, // !=
  113. ParenOpen,
  114. ParenClose,
  115. CurlyBraceOpen,
  116. CurlyBracketClose,
  117. SquareBraceOpen,
  118. SquareBracketClose,
  119. Colon,
  120. Comma,
  121. Semicolon,
  122. Whitespace
  123. }
  124. public enum RuleType
  125. {
  126. Unknown = 0,
  127. Style = 1,
  128. Charset = 2,
  129. Import = 3,
  130. Media = 4,
  131. FontFace = 5,
  132. Page = 6,
  133. Keyframes = 7,
  134. Keyframe = 8,
  135. Namespace = 10,
  136. CounterStyle = 11,
  137. Supports = 12,
  138. Document = 13,
  139. FontFeatureValues = 14,
  140. Viewport = 15,
  141. RegionStyle = 16
  142. }
  143. public enum UnitType
  144. {
  145. Unknown = 0,
  146. Number = 1,
  147. Percentage = 2,
  148. Ems = 3,
  149. Exs = 4,
  150. Pixel = 5,
  151. Centimeter = 6,
  152. Millimeter = 7,
  153. Inch = 8,
  154. Point = 9,
  155. Percent = 10,
  156. Degree = 11,
  157. Radian = 12,
  158. Grad = 13,
  159. Millisecond = 14,
  160. Second = 15,
  161. Hertz = 16,
  162. KiloHertz = 17,
  163. Dimension = 18,
  164. String = 19,
  165. Uri = 20,
  166. Ident = 21,
  167. Attribute = 22,
  168. Counter = 23,
  169. Rect = 24,
  170. RGB = 25,
  171. ViewportWidth = 26,
  172. ViewportHeight = 28,
  173. ViewportMin = 29,
  174. ViewportMax = 30,
  175. Turn = 31,
  176. }
  177. public enum DocumentFunction
  178. {
  179. Url,
  180. UrlPrefix,
  181. Domain,
  182. RegExp
  183. }
  184. public enum DirectionMode
  185. {
  186. LeftToRight,
  187. RightToLeft
  188. }
  189. public enum ParserError
  190. {
  191. EndOfFile,
  192. UnexpectedLineBreak,
  193. InvalidCharacter,
  194. UnexpectedCommentToken
  195. }
  196. internal enum SelectorOperation
  197. {
  198. Data,
  199. Attribute,
  200. AttributeOperator,
  201. AttributeValue,
  202. AttributeEnd,
  203. Class,
  204. PseudoClass,
  205. PseudoClassFunction,
  206. PseudoClassFunctionEnd,
  207. PseudoElement
  208. }
  209. internal enum ParsingContext
  210. {
  211. DataBlock,
  212. InSelector,
  213. InDeclaration,
  214. AfterProperty,
  215. BeforeValue,
  216. InValuePool,
  217. InValueList,
  218. InSingleValue,
  219. InMediaList,
  220. InMediaValue,
  221. BeforeImport,
  222. BeforeCharset,
  223. BeforeNamespacePrefix,
  224. AfterNamespacePrefix,
  225. BeforeFontFace,
  226. FontfaceData,
  227. FontfaceProperty,
  228. AfterInstruction,
  229. InCondition,
  230. BeforeKeyframesName,
  231. BeforeKeyframesData,
  232. KeyframesData,
  233. InKeyframeText,
  234. BeforePageSelector,
  235. BeforeDocumentFunction,
  236. InDocumentFunction,
  237. AfterDocumentFunction,
  238. BetweenDocumentFunctions,
  239. InUnknown,
  240. ValueImportant,
  241. AfterValue,
  242. InHexValue,
  243. InFunction
  244. }
  245. }
  246. #pragma warning restore