SourceCSSTokenizer.js 67 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572
  1. /* Generated by re2c 0.13.5 on Fri Sep 7 17:09:30 2012 */
  2. /*
  3. * Copyright (C) 2009 Google Inc. All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are
  7. * met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * * Redistributions in binary form must reproduce the above
  12. * copyright notice, this list of conditions and the following disclaimer
  13. * in the documentation and/or other materials provided with the
  14. * distribution.
  15. * * Neither the name of Google Inc. nor the names of its
  16. * contributors may be used to endorse or promote products derived from
  17. * this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  22. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  23. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  24. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  25. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  26. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  27. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  28. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  29. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  30. */
  31. // Generate js file as follows:
  32. /*
  33. re2c -isc Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js \
  34. | sed 's|^yy\([^:]*\)*\:|case \1:|' \
  35. | sed 's|[*]cursor[+][+]|this._charAt(cursor++)|' \
  36. | sed 's|[[*][+][+]cursor|this._charAt(++cursor)|' \
  37. | sed 's|[*]cursor|this._charAt(cursor)|' \
  38. | sed 's|yych = \*\([^;]*\)|yych = this._charAt\1|' \
  39. | sed 's|{ gotoCase = \([^; continue; };]*\)|{ gotoCase = \1; continue; }|' \
  40. | sed 's|yych <= \(0x[0-9a-fA-F]*\)|yych \<\= String.fromCharCode(\1)|' \
  41. | sed 's|unsigned\ int|var|' \
  42. | sed 's|var\ yych|case 1: case 1: var yych|' > Source/WebCore/inspector/front-end/SourceCSSTokenizer.js
  43. */
  44. /**
  45. * @constructor
  46. * @extends {WebInspector.SourceTokenizer}
  47. */
  48. WebInspector.SourceCSSTokenizer = function()
  49. {
  50. WebInspector.SourceTokenizer.call(this);
  51. this._propertyKeywords = WebInspector.CSSMetadata.cssPropertiesMetainfoKeySet();
  52. this._colorKeywords = WebInspector.CSSMetadata.colors();
  53. this._valueKeywords = [
  54. "above", "absolute", "activeborder", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll",
  55. "alternate", "always", "amharic", "amharic-abegede", "antialiased", "appworkspace", "arabic-indic", "armenian", "asterisks",
  56. "auto", "avoid", "background", "backwards", "baseline", "below", "bidi-override", "binary", "bengali", "blink",
  57. "block", "block-axis", "bold", "bolder", "border", "border-box", "both", "bottom", "break-all", "break-word", "button",
  58. "button-bevel", "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "cambodian", "capitalize", "caps-lock-indicator",
  59. "caption", "captiontext", "caret", "cell", "center", "checkbox", "circle", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic",
  60. "clear", "clip", "close-quote", "col-resize", "collapse", "compact", "condensed", "contain", "content", "content-box", "context-menu",
  61. "continuous", "copy", "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", "decimal-leading-zero", "default",
  62. "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "devanagari", "disc", "discard", "document",
  63. "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element",
  64. "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez",
  65. "ethiopic-abegede-ti-er", "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", "ethiopic-halehame-aa-et",
  66. "ethiopic-halehame-am-et", "ethiopic-halehame-gez", "ethiopic-halehame-om-et", "ethiopic-halehame-sid-et",
  67. "ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "ew-resize", "expanded",
  68. "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "footnotes", "forwards", "from", "geometricPrecision",
  69. "georgian", "graytext", "groove", "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew", "help",
  70. "hidden", "hide", "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore",
  71. "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline",
  72. "inline-axis", "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "justify", "kannada", "katakana",
  73. "katakana-iroha", "khmer", "landscape", "lao", "large", "larger", "left", "level", "lighter", "line-through", "linear", "lines",
  74. "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian", "lower-greek",
  75. "lower-hexadecimal", "lower-latin", "lower-norwegian", "lower-roman", "lowercase", "ltr", "malayalam", "match", "media-controls-background",
  76. "media-current-time-display", "media-fullscreen-button", "media-mute-button", "media-play-button", "media-return-to-realtime-button",
  77. "media-rewind-button", "media-seek-back-button", "media-seek-forward-button", "media-slider", "media-sliderthumb", "media-time-remaining-display",
  78. "media-volume-slider", "media-volume-slider-container", "media-volume-sliderthumb", "medium", "menu", "menulist", "menulist-button",
  79. "menulist-text", "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", "mix", "mongolian", "monospace", "move", "multiple",
  80. "myanmar", "n-resize", "narrower", "navy", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none",
  81. "normal", "not-allowed", "nowrap", "ns-resize", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote", "optimizeLegibility",
  82. "optimizeSpeed", "oriya", "oromo", "outset", "outside", "overlay", "overline", "padding", "padding-box", "painted", "paused",
  83. "persian", "plus-darker", "plus-lighter", "pointer", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress",
  84. "push-button", "radio", "read-only", "read-write", "read-write-plaintext-only", "relative", "repeat", "repeat-x",
  85. "repeat-y", "reset", "reverse", "rgb", "rgba", "ridge", "right", "round", "row-resize", "rtl", "run-in", "running", "s-resize", "sans-serif",
  86. "scroll", "scrollbar", "se-resize", "searchfield", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
  87. "searchfield-results-decoration", "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", "single",
  88. "skip-white-space", "slide", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
  89. "small", "small-caps", "small-caption", "smaller", "solid", "somali", "source-atop", "source-in", "source-out", "source-over",
  90. "space", "square", "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super",
  91. "sw-resize", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group",
  92. "table-row", "table-row-group", "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", "thick", "thin",
  93. "threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", "tigrinya-er-abegede",
  94. "tigrinya-et", "tigrinya-et-abegede", "to", "top", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-armenian",
  95. "upper-greek", "upper-hexadecimal", "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", "vertical", "vertical-text", "visible",
  96. "visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext",
  97. "x-large", "x-small", "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle",
  98. "-webkit-body", "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing",
  99. "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-pictograph",
  100. "-webkit-right", "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
  101. ].keySet();
  102. this._scssValueKeywords = [
  103. "abs", "adjust-color", "adjust-hue", "alpha", "append", "ceil", "change-color", "comparable", "complement", "darken", "desaturate",
  104. "fade-in", "fade-out", "floor", "grayscale", "hue", "ie-hex-str", "invert", "join", "length", "lighten",
  105. "lightness", "max", "min", "mix", "nth", "opacify", "opacity", "percentage", "quote", "round", "saturate",
  106. "saturation", "scale-color", "transparentize", "type-of", "unit", "unitless", "unquote", "zip"
  107. ].keySet();
  108. this._lexConditions = {
  109. INITIAL: 0,
  110. COMMENT: 1,
  111. DSTRING: 2,
  112. SSTRING: 3
  113. };
  114. this._parseConditions = {
  115. INITIAL: 0,
  116. PROPERTY: 1,
  117. PROPERTY_VALUE: 2,
  118. AT_RULE: 3,
  119. AT_MEDIA_RULE: 4
  120. };
  121. this.case_INITIAL = 1000;
  122. this.case_COMMENT = 1002;
  123. this.case_DSTRING = 1003;
  124. this.case_SSTRING = 1004;
  125. this.condition = this.createInitialCondition();
  126. }
  127. WebInspector.SourceCSSTokenizer.SCSSAtRelatedKeywords = ["from", "if", "in", "through"].keySet();
  128. WebInspector.SourceCSSTokenizer.MediaTypes = ["all", "aural", "braille", "embossed", "handheld", "import", "print", "projection", "screen", "tty", "tv"].keySet();
  129. WebInspector.SourceCSSTokenizer.prototype = {
  130. createInitialCondition: function()
  131. {
  132. return { lexCondition: this._lexConditions.INITIAL, parseCondition: this._parseConditions.INITIAL };
  133. },
  134. /**
  135. * @param {boolean=} stringEnds
  136. */
  137. _stringToken: function(cursor, stringEnds)
  138. {
  139. if (this._isPropertyValue())
  140. this.tokenType = "css-string";
  141. else
  142. this.tokenType = null;
  143. return cursor;
  144. },
  145. _isPropertyValue: function()
  146. {
  147. return this._condition.parseCondition === this._parseConditions.PROPERTY_VALUE || this._condition.parseCondition === this._parseConditions.AT_RULE;
  148. },
  149. _setParseCondition: function(condition)
  150. {
  151. this._condition.parseCondition = condition;
  152. },
  153. nextToken: function(cursor)
  154. {
  155. var cursorOnEnter = cursor;
  156. var gotoCase = 1;
  157. var YYMARKER;
  158. while (1) {
  159. switch (gotoCase)
  160. // Following comment is replaced with generated state machine.
  161. {
  162. case 1: var yych;
  163. var yyaccept = 0;
  164. if (this.getLexCondition() < 2) {
  165. if (this.getLexCondition() < 1) {
  166. { gotoCase = this.case_INITIAL; continue; };
  167. } else {
  168. { gotoCase = this.case_COMMENT; continue; };
  169. }
  170. } else {
  171. if (this.getLexCondition() < 3) {
  172. { gotoCase = this.case_DSTRING; continue; };
  173. } else {
  174. { gotoCase = this.case_SSTRING; continue; };
  175. }
  176. }
  177. /* *********************************** */
  178. case this.case_COMMENT:
  179. yych = this._charAt(cursor);
  180. if (yych <= '\f') {
  181. if (yych == '\n') { gotoCase = 4; continue; };
  182. { gotoCase = 3; continue; };
  183. } else {
  184. if (yych <= '\r') { gotoCase = 4; continue; };
  185. if (yych == '*') { gotoCase = 6; continue; };
  186. { gotoCase = 3; continue; };
  187. }
  188. case 2:
  189. { this.tokenType = "css-comment"; return cursor; }
  190. case 3:
  191. yyaccept = 0;
  192. yych = this._charAt(YYMARKER = ++cursor);
  193. { gotoCase = 12; continue; };
  194. case 4:
  195. ++cursor;
  196. { this.tokenType = null; return cursor; }
  197. case 6:
  198. yyaccept = 1;
  199. yych = this._charAt(YYMARKER = ++cursor);
  200. if (yych == '*') { gotoCase = 9; continue; };
  201. if (yych != '/') { gotoCase = 11; continue; };
  202. case 7:
  203. ++cursor;
  204. this.setLexCondition(this._lexConditions.INITIAL);
  205. { this.tokenType = "css-comment"; return cursor; }
  206. case 9:
  207. ++cursor;
  208. yych = this._charAt(cursor);
  209. if (yych == '*') { gotoCase = 9; continue; };
  210. if (yych == '/') { gotoCase = 7; continue; };
  211. case 11:
  212. yyaccept = 0;
  213. YYMARKER = ++cursor;
  214. yych = this._charAt(cursor);
  215. case 12:
  216. if (yych <= '\f') {
  217. if (yych == '\n') { gotoCase = 2; continue; };
  218. { gotoCase = 11; continue; };
  219. } else {
  220. if (yych <= '\r') { gotoCase = 2; continue; };
  221. if (yych == '*') { gotoCase = 9; continue; };
  222. { gotoCase = 11; continue; };
  223. }
  224. /* *********************************** */
  225. case this.case_DSTRING:
  226. yych = this._charAt(cursor);
  227. if (yych <= '\r') {
  228. if (yych == '\n') { gotoCase = 17; continue; };
  229. if (yych <= '\f') { gotoCase = 16; continue; };
  230. { gotoCase = 17; continue; };
  231. } else {
  232. if (yych <= '"') {
  233. if (yych <= '!') { gotoCase = 16; continue; };
  234. { gotoCase = 19; continue; };
  235. } else {
  236. if (yych == '\\') { gotoCase = 21; continue; };
  237. { gotoCase = 16; continue; };
  238. }
  239. }
  240. case 15:
  241. { return this._stringToken(cursor); }
  242. case 16:
  243. yyaccept = 0;
  244. yych = this._charAt(YYMARKER = ++cursor);
  245. { gotoCase = 23; continue; };
  246. case 17:
  247. ++cursor;
  248. case 18:
  249. { this.tokenType = null; return cursor; }
  250. case 19:
  251. ++cursor;
  252. case 20:
  253. this.setLexCondition(this._lexConditions.INITIAL);
  254. { return this._stringToken(cursor, true); }
  255. case 21:
  256. yych = this._charAt(++cursor);
  257. if (yych <= 'e') {
  258. if (yych <= '\'') {
  259. if (yych == '"') { gotoCase = 22; continue; };
  260. if (yych <= '&') { gotoCase = 18; continue; };
  261. } else {
  262. if (yych <= '\\') {
  263. if (yych <= '[') { gotoCase = 18; continue; };
  264. } else {
  265. if (yych != 'b') { gotoCase = 18; continue; };
  266. }
  267. }
  268. } else {
  269. if (yych <= 'r') {
  270. if (yych <= 'm') {
  271. if (yych >= 'g') { gotoCase = 18; continue; };
  272. } else {
  273. if (yych <= 'n') { gotoCase = 22; continue; };
  274. if (yych <= 'q') { gotoCase = 18; continue; };
  275. }
  276. } else {
  277. if (yych <= 't') {
  278. if (yych <= 's') { gotoCase = 18; continue; };
  279. } else {
  280. if (yych != 'v') { gotoCase = 18; continue; };
  281. }
  282. }
  283. }
  284. case 22:
  285. yyaccept = 0;
  286. YYMARKER = ++cursor;
  287. yych = this._charAt(cursor);
  288. case 23:
  289. if (yych <= '\r') {
  290. if (yych == '\n') { gotoCase = 15; continue; };
  291. if (yych <= '\f') { gotoCase = 22; continue; };
  292. { gotoCase = 15; continue; };
  293. } else {
  294. if (yych <= '"') {
  295. if (yych <= '!') { gotoCase = 22; continue; };
  296. { gotoCase = 26; continue; };
  297. } else {
  298. if (yych != '\\') { gotoCase = 22; continue; };
  299. }
  300. }
  301. ++cursor;
  302. yych = this._charAt(cursor);
  303. if (yych <= 'e') {
  304. if (yych <= '\'') {
  305. if (yych == '"') { gotoCase = 22; continue; };
  306. if (yych >= '\'') { gotoCase = 22; continue; };
  307. } else {
  308. if (yych <= '\\') {
  309. if (yych >= '\\') { gotoCase = 22; continue; };
  310. } else {
  311. if (yych == 'b') { gotoCase = 22; continue; };
  312. }
  313. }
  314. } else {
  315. if (yych <= 'r') {
  316. if (yych <= 'm') {
  317. if (yych <= 'f') { gotoCase = 22; continue; };
  318. } else {
  319. if (yych <= 'n') { gotoCase = 22; continue; };
  320. if (yych >= 'r') { gotoCase = 22; continue; };
  321. }
  322. } else {
  323. if (yych <= 't') {
  324. if (yych >= 't') { gotoCase = 22; continue; };
  325. } else {
  326. if (yych == 'v') { gotoCase = 22; continue; };
  327. }
  328. }
  329. }
  330. cursor = YYMARKER;
  331. { gotoCase = 15; continue; };
  332. case 26:
  333. ++cursor;
  334. yych = this._charAt(cursor);
  335. { gotoCase = 20; continue; };
  336. /* *********************************** */
  337. case this.case_INITIAL:
  338. yych = this._charAt(cursor);
  339. if (yych <= ':') {
  340. if (yych <= '&') {
  341. if (yych <= '"') {
  342. if (yych <= ' ') { gotoCase = 29; continue; };
  343. if (yych <= '!') { gotoCase = 31; continue; };
  344. { gotoCase = 33; continue; };
  345. } else {
  346. if (yych <= '#') { gotoCase = 34; continue; };
  347. if (yych <= '$') { gotoCase = 35; continue; };
  348. if (yych >= '&') { gotoCase = 31; continue; };
  349. }
  350. } else {
  351. if (yych <= '-') {
  352. if (yych <= '\'') { gotoCase = 36; continue; };
  353. if (yych >= '-') { gotoCase = 37; continue; };
  354. } else {
  355. if (yych <= '.') { gotoCase = 38; continue; };
  356. if (yych <= '/') { gotoCase = 39; continue; };
  357. if (yych <= '9') { gotoCase = 40; continue; };
  358. { gotoCase = 42; continue; };
  359. }
  360. }
  361. } else {
  362. if (yych <= ']') {
  363. if (yych <= '=') {
  364. if (yych <= ';') { gotoCase = 44; continue; };
  365. if (yych >= '=') { gotoCase = 31; continue; };
  366. } else {
  367. if (yych <= '?') { gotoCase = 29; continue; };
  368. if (yych != '\\') { gotoCase = 31; continue; };
  369. }
  370. } else {
  371. if (yych <= 'z') {
  372. if (yych == '_') { gotoCase = 31; continue; };
  373. if (yych >= 'a') { gotoCase = 31; continue; };
  374. } else {
  375. if (yych <= '{') { gotoCase = 46; continue; };
  376. if (yych == '}') { gotoCase = 48; continue; };
  377. }
  378. }
  379. }
  380. case 29:
  381. ++cursor;
  382. case 30:
  383. { this.tokenType = null; return cursor; }
  384. case 31:
  385. ++cursor;
  386. yych = this._charAt(cursor);
  387. { gotoCase = 51; continue; };
  388. case 32:
  389. {
  390. var token = this._line.substring(cursorOnEnter, cursor);
  391. this.tokenType = null;
  392. if (this._condition.parseCondition === this._parseConditions.INITIAL || this._condition.parseCondition === this._parseConditions.PROPERTY) {
  393. if (token.charAt(0) === "@") {
  394. this.tokenType = "css-at-rule";
  395. this._setParseCondition(token === "@media" ? this._parseConditions.AT_MEDIA_RULE : this._parseConditions.AT_RULE);
  396. this._condition.atKeyword = token;
  397. } else if (this._condition.parseCondition === this._parseConditions.INITIAL)
  398. this.tokenType = "css-selector";
  399. else if (this._propertyKeywords.hasOwnProperty(token))
  400. this.tokenType = "css-property";
  401. } else if (this._condition.parseCondition === this._parseConditions.AT_MEDIA_RULE || this._condition.parseCondition === this._parseConditions.AT_RULE) {
  402. if (WebInspector.SourceCSSTokenizer.SCSSAtRelatedKeywords.hasOwnProperty(token))
  403. this.tokenType = "css-at-rule";
  404. else if (WebInspector.SourceCSSTokenizer.MediaTypes.hasOwnProperty(token))
  405. this.tokenType = "css-keyword";
  406. }
  407. if (this.tokenType)
  408. return cursor;
  409. if (this._isPropertyValue()) {
  410. var firstChar = token.charAt(0);
  411. if (firstChar === "$")
  412. this.tokenType = "scss-variable";
  413. else if (firstChar === "!")
  414. this.tokenType = "css-bang-keyword";
  415. else if (this._condition.atKeyword === "@extend")
  416. this.tokenType = "css-selector";
  417. else if (this._valueKeywords.hasOwnProperty(token) || this._scssValueKeywords.hasOwnProperty(token))
  418. this.tokenType = "css-keyword";
  419. else if (this._colorKeywords.hasOwnProperty(token)) {
  420. // FIXME: this does not convert tokens toLowerCase() for the sake of speed.
  421. this.tokenType = "css-color";
  422. }
  423. } else if (this._condition.parseCondition !== this._parseConditions.PROPERTY_VALUE)
  424. this.tokenType = "css-selector";
  425. return cursor;
  426. }
  427. case 33:
  428. yyaccept = 0;
  429. yych = this._charAt(YYMARKER = ++cursor);
  430. if (yych <= '.') {
  431. if (yych <= '!') {
  432. if (yych <= '\f') {
  433. if (yych == '\n') { gotoCase = 32; continue; };
  434. { gotoCase = 132; continue; };
  435. } else {
  436. if (yych <= '\r') { gotoCase = 32; continue; };
  437. if (yych <= ' ') { gotoCase = 132; continue; };
  438. { gotoCase = 130; continue; };
  439. }
  440. } else {
  441. if (yych <= '\'') {
  442. if (yych <= '"') { gotoCase = 116; continue; };
  443. if (yych <= '%') { gotoCase = 132; continue; };
  444. { gotoCase = 130; continue; };
  445. } else {
  446. if (yych == '-') { gotoCase = 130; continue; };
  447. { gotoCase = 132; continue; };
  448. }
  449. }
  450. } else {
  451. if (yych <= '\\') {
  452. if (yych <= '=') {
  453. if (yych <= '9') { gotoCase = 130; continue; };
  454. if (yych <= '<') { gotoCase = 132; continue; };
  455. { gotoCase = 130; continue; };
  456. } else {
  457. if (yych <= '?') { gotoCase = 132; continue; };
  458. if (yych <= '[') { gotoCase = 130; continue; };
  459. { gotoCase = 134; continue; };
  460. }
  461. } else {
  462. if (yych <= '_') {
  463. if (yych == '^') { gotoCase = 132; continue; };
  464. { gotoCase = 130; continue; };
  465. } else {
  466. if (yych <= '`') { gotoCase = 132; continue; };
  467. if (yych <= 'z') { gotoCase = 130; continue; };
  468. { gotoCase = 132; continue; };
  469. }
  470. }
  471. }
  472. case 34:
  473. yych = this._charAt(++cursor);
  474. if (yych <= '@') {
  475. if (yych <= '/') { gotoCase = 30; continue; };
  476. if (yych <= '9') { gotoCase = 127; continue; };
  477. { gotoCase = 30; continue; };
  478. } else {
  479. if (yych <= 'Z') { gotoCase = 127; continue; };
  480. if (yych <= '`') { gotoCase = 30; continue; };
  481. if (yych <= 'z') { gotoCase = 127; continue; };
  482. { gotoCase = 30; continue; };
  483. }
  484. case 35:
  485. yych = this._charAt(++cursor);
  486. if (yych <= '<') {
  487. if (yych <= '\'') {
  488. if (yych <= ' ') { gotoCase = 30; continue; };
  489. if (yych <= '"') { gotoCase = 124; continue; };
  490. if (yych <= '%') { gotoCase = 30; continue; };
  491. { gotoCase = 124; continue; };
  492. } else {
  493. if (yych <= '-') {
  494. if (yych <= ',') { gotoCase = 30; continue; };
  495. { gotoCase = 124; continue; };
  496. } else {
  497. if (yych <= '.') { gotoCase = 30; continue; };
  498. if (yych <= '9') { gotoCase = 124; continue; };
  499. { gotoCase = 30; continue; };
  500. }
  501. }
  502. } else {
  503. if (yych <= ']') {
  504. if (yych <= '?') {
  505. if (yych <= '=') { gotoCase = 124; continue; };
  506. { gotoCase = 30; continue; };
  507. } else {
  508. if (yych == '\\') { gotoCase = 30; continue; };
  509. { gotoCase = 124; continue; };
  510. }
  511. } else {
  512. if (yych <= '_') {
  513. if (yych <= '^') { gotoCase = 30; continue; };
  514. { gotoCase = 124; continue; };
  515. } else {
  516. if (yych <= '`') { gotoCase = 30; continue; };
  517. if (yych <= 'z') { gotoCase = 124; continue; };
  518. { gotoCase = 30; continue; };
  519. }
  520. }
  521. }
  522. case 36:
  523. yyaccept = 0;
  524. yych = this._charAt(YYMARKER = ++cursor);
  525. if (yych <= '.') {
  526. if (yych <= '"') {
  527. if (yych <= '\f') {
  528. if (yych == '\n') { gotoCase = 32; continue; };
  529. { gotoCase = 118; continue; };
  530. } else {
  531. if (yych <= '\r') { gotoCase = 32; continue; };
  532. if (yych <= ' ') { gotoCase = 118; continue; };
  533. { gotoCase = 114; continue; };
  534. }
  535. } else {
  536. if (yych <= '\'') {
  537. if (yych <= '%') { gotoCase = 118; continue; };
  538. if (yych <= '&') { gotoCase = 114; continue; };
  539. { gotoCase = 116; continue; };
  540. } else {
  541. if (yych == '-') { gotoCase = 114; continue; };
  542. { gotoCase = 118; continue; };
  543. }
  544. }
  545. } else {
  546. if (yych <= '\\') {
  547. if (yych <= '=') {
  548. if (yych <= '9') { gotoCase = 114; continue; };
  549. if (yych <= '<') { gotoCase = 118; continue; };
  550. { gotoCase = 114; continue; };
  551. } else {
  552. if (yych <= '?') { gotoCase = 118; continue; };
  553. if (yych <= '[') { gotoCase = 114; continue; };
  554. { gotoCase = 120; continue; };
  555. }
  556. } else {
  557. if (yych <= '_') {
  558. if (yych == '^') { gotoCase = 118; continue; };
  559. { gotoCase = 114; continue; };
  560. } else {
  561. if (yych <= '`') { gotoCase = 118; continue; };
  562. if (yych <= 'z') { gotoCase = 114; continue; };
  563. { gotoCase = 118; continue; };
  564. }
  565. }
  566. }
  567. case 37:
  568. yyaccept = 0;
  569. yych = this._charAt(YYMARKER = ++cursor);
  570. if (yych == '.') { gotoCase = 67; continue; };
  571. if (yych <= '/') { gotoCase = 51; continue; };
  572. if (yych <= '9') { gotoCase = 52; continue; };
  573. { gotoCase = 51; continue; };
  574. case 38:
  575. yych = this._charAt(++cursor);
  576. if (yych <= '/') { gotoCase = 30; continue; };
  577. if (yych <= '9') { gotoCase = 70; continue; };
  578. { gotoCase = 30; continue; };
  579. case 39:
  580. yyaccept = 0;
  581. yych = this._charAt(YYMARKER = ++cursor);
  582. if (yych == '*') { gotoCase = 106; continue; };
  583. { gotoCase = 51; continue; };
  584. case 40:
  585. yyaccept = 1;
  586. yych = this._charAt(YYMARKER = ++cursor);
  587. switch (yych) {
  588. case '!':
  589. case '"':
  590. case '&':
  591. case '\'':
  592. case '-':
  593. case '/':
  594. case '=':
  595. case '@':
  596. case 'A':
  597. case 'B':
  598. case 'C':
  599. case 'D':
  600. case 'E':
  601. case 'F':
  602. case 'G':
  603. case 'I':
  604. case 'J':
  605. case 'K':
  606. case 'L':
  607. case 'M':
  608. case 'N':
  609. case 'O':
  610. case 'P':
  611. case 'Q':
  612. case 'R':
  613. case 'S':
  614. case 'T':
  615. case 'U':
  616. case 'V':
  617. case 'W':
  618. case 'X':
  619. case 'Y':
  620. case 'Z':
  621. case '[':
  622. case ']':
  623. case 'a':
  624. case 'b':
  625. case 'f':
  626. case 'h':
  627. case 'j':
  628. case 'l':
  629. case 'n':
  630. case 'o':
  631. case 'q':
  632. case 'u':
  633. case 'v':
  634. case 'w':
  635. case 'x':
  636. case 'y':
  637. case 'z': { gotoCase = 50; continue; };
  638. case '%': { gotoCase = 69; continue; };
  639. case '.': { gotoCase = 67; continue; };
  640. case '0':
  641. case '1':
  642. case '2':
  643. case '3':
  644. case '4':
  645. case '5':
  646. case '6':
  647. case '7':
  648. case '8':
  649. case '9': { gotoCase = 52; continue; };
  650. case 'H': { gotoCase = 54; continue; };
  651. case '_': { gotoCase = 55; continue; };
  652. case 'c': { gotoCase = 56; continue; };
  653. case 'd': { gotoCase = 57; continue; };
  654. case 'e': { gotoCase = 58; continue; };
  655. case 'g': { gotoCase = 59; continue; };
  656. case 'i': { gotoCase = 60; continue; };
  657. case 'k': { gotoCase = 61; continue; };
  658. case 'm': { gotoCase = 62; continue; };
  659. case 'p': { gotoCase = 63; continue; };
  660. case 'r': { gotoCase = 64; continue; };
  661. case 's': { gotoCase = 65; continue; };
  662. case 't': { gotoCase = 66; continue; };
  663. default: { gotoCase = 41; continue; };
  664. }
  665. case 41:
  666. {
  667. if (this._isPropertyValue())
  668. this.tokenType = "css-number";
  669. else
  670. this.tokenType = null;
  671. return cursor;
  672. }
  673. case 42:
  674. ++cursor;
  675. {
  676. this.tokenType = null;
  677. if (this._condition.parseCondition === this._parseConditions.PROPERTY || this._condition.parseCondition === this._parseConditions.INITIAL)
  678. this._setParseCondition(this._parseConditions.PROPERTY_VALUE);
  679. return cursor;
  680. }
  681. case 44:
  682. ++cursor;
  683. {
  684. this.tokenType = null;
  685. this._setParseCondition(this._condition.openBraces ? this._parseConditions.PROPERTY : this._parseConditions.INITIAL);
  686. delete this._condition.atKeyword;
  687. return cursor;
  688. }
  689. case 46:
  690. ++cursor;
  691. {
  692. this.tokenType = "block-start";
  693. this._condition.openBraces = (this._condition.openBraces || 0) + 1;
  694. if (this._condition.parseCondition === this._parseConditions.AT_MEDIA_RULE)
  695. this._setParseCondition(this._parseConditions.INITIAL);
  696. else
  697. this._setParseCondition(this._parseConditions.PROPERTY);
  698. return cursor;
  699. }
  700. case 48:
  701. ++cursor;
  702. {
  703. this.tokenType = "block-end";
  704. if (this._condition.openBraces > 0)
  705. --this._condition.openBraces;
  706. this._setParseCondition(this._condition.openBraces ? this._parseConditions.PROPERTY : this._parseConditions.INITIAL);
  707. delete this._condition.atKeyword;
  708. return cursor;
  709. }
  710. case 50:
  711. ++cursor;
  712. yych = this._charAt(cursor);
  713. case 51:
  714. if (yych <= '<') {
  715. if (yych <= '\'') {
  716. if (yych <= ' ') { gotoCase = 32; continue; };
  717. if (yych <= '"') { gotoCase = 50; continue; };
  718. if (yych <= '%') { gotoCase = 32; continue; };
  719. { gotoCase = 50; continue; };
  720. } else {
  721. if (yych <= '-') {
  722. if (yych <= ',') { gotoCase = 32; continue; };
  723. { gotoCase = 50; continue; };
  724. } else {
  725. if (yych <= '.') { gotoCase = 32; continue; };
  726. if (yych <= '9') { gotoCase = 50; continue; };
  727. { gotoCase = 32; continue; };
  728. }
  729. }
  730. } else {
  731. if (yych <= ']') {
  732. if (yych <= '?') {
  733. if (yych <= '=') { gotoCase = 50; continue; };
  734. { gotoCase = 32; continue; };
  735. } else {
  736. if (yych == '\\') { gotoCase = 32; continue; };
  737. { gotoCase = 50; continue; };
  738. }
  739. } else {
  740. if (yych <= '_') {
  741. if (yych <= '^') { gotoCase = 32; continue; };
  742. { gotoCase = 50; continue; };
  743. } else {
  744. if (yych <= '`') { gotoCase = 32; continue; };
  745. if (yych <= 'z') { gotoCase = 50; continue; };
  746. { gotoCase = 32; continue; };
  747. }
  748. }
  749. }
  750. case 52:
  751. yyaccept = 1;
  752. YYMARKER = ++cursor;
  753. yych = this._charAt(cursor);
  754. switch (yych) {
  755. case '!':
  756. case '"':
  757. case '&':
  758. case '\'':
  759. case '-':
  760. case '/':
  761. case '=':
  762. case '@':
  763. case 'A':
  764. case 'B':
  765. case 'C':
  766. case 'D':
  767. case 'E':
  768. case 'F':
  769. case 'G':
  770. case 'I':
  771. case 'J':
  772. case 'K':
  773. case 'L':
  774. case 'M':
  775. case 'N':
  776. case 'O':
  777. case 'P':
  778. case 'Q':
  779. case 'R':
  780. case 'S':
  781. case 'T':
  782. case 'U':
  783. case 'V':
  784. case 'W':
  785. case 'X':
  786. case 'Y':
  787. case 'Z':
  788. case '[':
  789. case ']':
  790. case 'a':
  791. case 'b':
  792. case 'f':
  793. case 'h':
  794. case 'j':
  795. case 'l':
  796. case 'n':
  797. case 'o':
  798. case 'q':
  799. case 'u':
  800. case 'v':
  801. case 'w':
  802. case 'x':
  803. case 'y':
  804. case 'z': { gotoCase = 50; continue; };
  805. case '%': { gotoCase = 69; continue; };
  806. case '.': { gotoCase = 67; continue; };
  807. case '0':
  808. case '1':
  809. case '2':
  810. case '3':
  811. case '4':
  812. case '5':
  813. case '6':
  814. case '7':
  815. case '8':
  816. case '9': { gotoCase = 52; continue; };
  817. case 'H': { gotoCase = 54; continue; };
  818. case '_': { gotoCase = 55; continue; };
  819. case 'c': { gotoCase = 56; continue; };
  820. case 'd': { gotoCase = 57; continue; };
  821. case 'e': { gotoCase = 58; continue; };
  822. case 'g': { gotoCase = 59; continue; };
  823. case 'i': { gotoCase = 60; continue; };
  824. case 'k': { gotoCase = 61; continue; };
  825. case 'm': { gotoCase = 62; continue; };
  826. case 'p': { gotoCase = 63; continue; };
  827. case 'r': { gotoCase = 64; continue; };
  828. case 's': { gotoCase = 65; continue; };
  829. case 't': { gotoCase = 66; continue; };
  830. default: { gotoCase = 41; continue; };
  831. }
  832. case 54:
  833. yych = this._charAt(++cursor);
  834. if (yych == 'z') { gotoCase = 65; continue; };
  835. { gotoCase = 51; continue; };
  836. case 55:
  837. yych = this._charAt(++cursor);
  838. if (yych == '_') { gotoCase = 103; continue; };
  839. { gotoCase = 51; continue; };
  840. case 56:
  841. yych = this._charAt(++cursor);
  842. if (yych == 'm') { gotoCase = 65; continue; };
  843. { gotoCase = 51; continue; };
  844. case 57:
  845. yych = this._charAt(++cursor);
  846. if (yych == 'e') { gotoCase = 102; continue; };
  847. { gotoCase = 51; continue; };
  848. case 58:
  849. yych = this._charAt(++cursor);
  850. if (yych == 'm') { gotoCase = 65; continue; };
  851. if (yych == 'x') { gotoCase = 65; continue; };
  852. { gotoCase = 51; continue; };
  853. case 59:
  854. yych = this._charAt(++cursor);
  855. if (yych == 'r') { gotoCase = 100; continue; };
  856. { gotoCase = 51; continue; };
  857. case 60:
  858. yych = this._charAt(++cursor);
  859. if (yych == 'n') { gotoCase = 65; continue; };
  860. { gotoCase = 51; continue; };
  861. case 61:
  862. yych = this._charAt(++cursor);
  863. if (yych == 'H') { gotoCase = 99; continue; };
  864. { gotoCase = 51; continue; };
  865. case 62:
  866. yych = this._charAt(++cursor);
  867. if (yych == 'm') { gotoCase = 65; continue; };
  868. if (yych == 's') { gotoCase = 65; continue; };
  869. { gotoCase = 51; continue; };
  870. case 63:
  871. yych = this._charAt(++cursor);
  872. if (yych <= 's') {
  873. if (yych == 'c') { gotoCase = 65; continue; };
  874. { gotoCase = 51; continue; };
  875. } else {
  876. if (yych <= 't') { gotoCase = 65; continue; };
  877. if (yych == 'x') { gotoCase = 65; continue; };
  878. { gotoCase = 51; continue; };
  879. }
  880. case 64:
  881. yych = this._charAt(++cursor);
  882. if (yych == 'a') { gotoCase = 97; continue; };
  883. if (yych == 'e') { gotoCase = 98; continue; };
  884. { gotoCase = 51; continue; };
  885. case 65:
  886. yych = this._charAt(++cursor);
  887. if (yych <= '<') {
  888. if (yych <= '\'') {
  889. if (yych <= ' ') { gotoCase = 41; continue; };
  890. if (yych <= '"') { gotoCase = 50; continue; };
  891. if (yych <= '%') { gotoCase = 41; continue; };
  892. { gotoCase = 50; continue; };
  893. } else {
  894. if (yych <= '-') {
  895. if (yych <= ',') { gotoCase = 41; continue; };
  896. { gotoCase = 50; continue; };
  897. } else {
  898. if (yych <= '.') { gotoCase = 41; continue; };
  899. if (yych <= '9') { gotoCase = 50; continue; };
  900. { gotoCase = 41; continue; };
  901. }
  902. }
  903. } else {
  904. if (yych <= ']') {
  905. if (yych <= '?') {
  906. if (yych <= '=') { gotoCase = 50; continue; };
  907. { gotoCase = 41; continue; };
  908. } else {
  909. if (yych == '\\') { gotoCase = 41; continue; };
  910. { gotoCase = 50; continue; };
  911. }
  912. } else {
  913. if (yych <= '_') {
  914. if (yych <= '^') { gotoCase = 41; continue; };
  915. { gotoCase = 50; continue; };
  916. } else {
  917. if (yych <= '`') { gotoCase = 41; continue; };
  918. if (yych <= 'z') { gotoCase = 50; continue; };
  919. { gotoCase = 41; continue; };
  920. }
  921. }
  922. }
  923. case 66:
  924. yych = this._charAt(++cursor);
  925. if (yych == 'u') { gotoCase = 95; continue; };
  926. { gotoCase = 51; continue; };
  927. case 67:
  928. yych = this._charAt(++cursor);
  929. if (yych <= '/') { gotoCase = 68; continue; };
  930. if (yych <= '9') { gotoCase = 70; continue; };
  931. case 68:
  932. cursor = YYMARKER;
  933. if (yyaccept <= 0) {
  934. { gotoCase = 32; continue; };
  935. } else {
  936. { gotoCase = 41; continue; };
  937. }
  938. case 69:
  939. yych = this._charAt(++cursor);
  940. { gotoCase = 41; continue; };
  941. case 70:
  942. yyaccept = 1;
  943. YYMARKER = ++cursor;
  944. yych = this._charAt(cursor);
  945. if (yych <= 'f') {
  946. if (yych <= 'H') {
  947. if (yych <= '/') {
  948. if (yych == '%') { gotoCase = 69; continue; };
  949. { gotoCase = 41; continue; };
  950. } else {
  951. if (yych <= '9') { gotoCase = 70; continue; };
  952. if (yych <= 'G') { gotoCase = 41; continue; };
  953. { gotoCase = 82; continue; };
  954. }
  955. } else {
  956. if (yych <= 'b') {
  957. if (yych == '_') { gotoCase = 74; continue; };
  958. { gotoCase = 41; continue; };
  959. } else {
  960. if (yych <= 'c') { gotoCase = 76; continue; };
  961. if (yych <= 'd') { gotoCase = 79; continue; };
  962. if (yych >= 'f') { gotoCase = 41; continue; };
  963. }
  964. }
  965. } else {
  966. if (yych <= 'm') {
  967. if (yych <= 'i') {
  968. if (yych <= 'g') { gotoCase = 80; continue; };
  969. if (yych <= 'h') { gotoCase = 41; continue; };
  970. { gotoCase = 78; continue; };
  971. } else {
  972. if (yych == 'k') { gotoCase = 83; continue; };
  973. if (yych <= 'l') { gotoCase = 41; continue; };
  974. { gotoCase = 77; continue; };
  975. }
  976. } else {
  977. if (yych <= 'q') {
  978. if (yych == 'p') { gotoCase = 75; continue; };
  979. { gotoCase = 41; continue; };
  980. } else {
  981. if (yych <= 'r') { gotoCase = 73; continue; };
  982. if (yych <= 's') { gotoCase = 69; continue; };
  983. if (yych <= 't') { gotoCase = 81; continue; };
  984. { gotoCase = 41; continue; };
  985. }
  986. }
  987. }
  988. yych = this._charAt(++cursor);
  989. if (yych == 'm') { gotoCase = 69; continue; };
  990. if (yych == 'x') { gotoCase = 69; continue; };
  991. { gotoCase = 68; continue; };
  992. case 73:
  993. yych = this._charAt(++cursor);
  994. if (yych == 'a') { gotoCase = 93; continue; };
  995. if (yych == 'e') { gotoCase = 94; continue; };
  996. { gotoCase = 68; continue; };
  997. case 74:
  998. yych = this._charAt(++cursor);
  999. if (yych == '_') { gotoCase = 90; continue; };
  1000. { gotoCase = 68; continue; };
  1001. case 75:
  1002. yych = this._charAt(++cursor);
  1003. if (yych <= 's') {
  1004. if (yych == 'c') { gotoCase = 69; continue; };
  1005. { gotoCase = 68; continue; };
  1006. } else {
  1007. if (yych <= 't') { gotoCase = 69; continue; };
  1008. if (yych == 'x') { gotoCase = 69; continue; };
  1009. { gotoCase = 68; continue; };
  1010. }
  1011. case 76:
  1012. yych = this._charAt(++cursor);
  1013. if (yych == 'm') { gotoCase = 69; continue; };
  1014. { gotoCase = 68; continue; };
  1015. case 77:
  1016. yych = this._charAt(++cursor);
  1017. if (yych == 'm') { gotoCase = 69; continue; };
  1018. if (yych == 's') { gotoCase = 69; continue; };
  1019. { gotoCase = 68; continue; };
  1020. case 78:
  1021. yych = this._charAt(++cursor);
  1022. if (yych == 'n') { gotoCase = 69; continue; };
  1023. { gotoCase = 68; continue; };
  1024. case 79:
  1025. yych = this._charAt(++cursor);
  1026. if (yych == 'e') { gotoCase = 89; continue; };
  1027. { gotoCase = 68; continue; };
  1028. case 80:
  1029. yych = this._charAt(++cursor);
  1030. if (yych == 'r') { gotoCase = 87; continue; };
  1031. { gotoCase = 68; continue; };
  1032. case 81:
  1033. yych = this._charAt(++cursor);
  1034. if (yych == 'u') { gotoCase = 85; continue; };
  1035. { gotoCase = 68; continue; };
  1036. case 82:
  1037. yych = this._charAt(++cursor);
  1038. if (yych == 'z') { gotoCase = 69; continue; };
  1039. { gotoCase = 68; continue; };
  1040. case 83:
  1041. yych = this._charAt(++cursor);
  1042. if (yych != 'H') { gotoCase = 68; continue; };
  1043. yych = this._charAt(++cursor);
  1044. if (yych == 'z') { gotoCase = 69; continue; };
  1045. { gotoCase = 68; continue; };
  1046. case 85:
  1047. yych = this._charAt(++cursor);
  1048. if (yych != 'r') { gotoCase = 68; continue; };
  1049. yych = this._charAt(++cursor);
  1050. if (yych == 'n') { gotoCase = 69; continue; };
  1051. { gotoCase = 68; continue; };
  1052. case 87:
  1053. yych = this._charAt(++cursor);
  1054. if (yych != 'a') { gotoCase = 68; continue; };
  1055. yych = this._charAt(++cursor);
  1056. if (yych == 'd') { gotoCase = 69; continue; };
  1057. { gotoCase = 68; continue; };
  1058. case 89:
  1059. yych = this._charAt(++cursor);
  1060. if (yych == 'g') { gotoCase = 69; continue; };
  1061. { gotoCase = 68; continue; };
  1062. case 90:
  1063. yych = this._charAt(++cursor);
  1064. if (yych != 'q') { gotoCase = 68; continue; };
  1065. yych = this._charAt(++cursor);
  1066. if (yych != 'e') { gotoCase = 68; continue; };
  1067. yych = this._charAt(++cursor);
  1068. if (yych == 'm') { gotoCase = 69; continue; };
  1069. { gotoCase = 68; continue; };
  1070. case 93:
  1071. yych = this._charAt(++cursor);
  1072. if (yych == 'd') { gotoCase = 69; continue; };
  1073. { gotoCase = 68; continue; };
  1074. case 94:
  1075. yych = this._charAt(++cursor);
  1076. if (yych == 'm') { gotoCase = 69; continue; };
  1077. { gotoCase = 68; continue; };
  1078. case 95:
  1079. yych = this._charAt(++cursor);
  1080. if (yych != 'r') { gotoCase = 51; continue; };
  1081. yych = this._charAt(++cursor);
  1082. if (yych == 'n') { gotoCase = 65; continue; };
  1083. { gotoCase = 51; continue; };
  1084. case 97:
  1085. yych = this._charAt(++cursor);
  1086. if (yych == 'd') { gotoCase = 65; continue; };
  1087. { gotoCase = 51; continue; };
  1088. case 98:
  1089. yych = this._charAt(++cursor);
  1090. if (yych == 'm') { gotoCase = 65; continue; };
  1091. { gotoCase = 51; continue; };
  1092. case 99:
  1093. yych = this._charAt(++cursor);
  1094. if (yych == 'z') { gotoCase = 65; continue; };
  1095. { gotoCase = 51; continue; };
  1096. case 100:
  1097. yych = this._charAt(++cursor);
  1098. if (yych != 'a') { gotoCase = 51; continue; };
  1099. yych = this._charAt(++cursor);
  1100. if (yych == 'd') { gotoCase = 65; continue; };
  1101. { gotoCase = 51; continue; };
  1102. case 102:
  1103. yych = this._charAt(++cursor);
  1104. if (yych == 'g') { gotoCase = 65; continue; };
  1105. { gotoCase = 51; continue; };
  1106. case 103:
  1107. yych = this._charAt(++cursor);
  1108. if (yych != 'q') { gotoCase = 51; continue; };
  1109. yych = this._charAt(++cursor);
  1110. if (yych != 'e') { gotoCase = 51; continue; };
  1111. yych = this._charAt(++cursor);
  1112. if (yych == 'm') { gotoCase = 65; continue; };
  1113. { gotoCase = 51; continue; };
  1114. case 106:
  1115. ++cursor;
  1116. yych = this._charAt(cursor);
  1117. if (yych <= '\f') {
  1118. if (yych == '\n') { gotoCase = 110; continue; };
  1119. { gotoCase = 106; continue; };
  1120. } else {
  1121. if (yych <= '\r') { gotoCase = 110; continue; };
  1122. if (yych != '*') { gotoCase = 106; continue; };
  1123. }
  1124. case 108:
  1125. ++cursor;
  1126. yych = this._charAt(cursor);
  1127. if (yych == '*') { gotoCase = 108; continue; };
  1128. if (yych == '/') { gotoCase = 112; continue; };
  1129. { gotoCase = 106; continue; };
  1130. case 110:
  1131. ++cursor;
  1132. this.setLexCondition(this._lexConditions.COMMENT);
  1133. { this.tokenType = "css-comment"; return cursor; }
  1134. case 112:
  1135. ++cursor;
  1136. { this.tokenType = "css-comment"; return cursor; }
  1137. case 114:
  1138. yyaccept = 0;
  1139. YYMARKER = ++cursor;
  1140. yych = this._charAt(cursor);
  1141. if (yych <= '.') {
  1142. if (yych <= '"') {
  1143. if (yych <= '\f') {
  1144. if (yych == '\n') { gotoCase = 32; continue; };
  1145. { gotoCase = 118; continue; };
  1146. } else {
  1147. if (yych <= '\r') { gotoCase = 32; continue; };
  1148. if (yych <= ' ') { gotoCase = 118; continue; };
  1149. { gotoCase = 114; continue; };
  1150. }
  1151. } else {
  1152. if (yych <= '\'') {
  1153. if (yych <= '%') { gotoCase = 118; continue; };
  1154. if (yych <= '&') { gotoCase = 114; continue; };
  1155. } else {
  1156. if (yych == '-') { gotoCase = 114; continue; };
  1157. { gotoCase = 118; continue; };
  1158. }
  1159. }
  1160. } else {
  1161. if (yych <= '\\') {
  1162. if (yych <= '=') {
  1163. if (yych <= '9') { gotoCase = 114; continue; };
  1164. if (yych <= '<') { gotoCase = 118; continue; };
  1165. { gotoCase = 114; continue; };
  1166. } else {
  1167. if (yych <= '?') { gotoCase = 118; continue; };
  1168. if (yych <= '[') { gotoCase = 114; continue; };
  1169. { gotoCase = 120; continue; };
  1170. }
  1171. } else {
  1172. if (yych <= '_') {
  1173. if (yych == '^') { gotoCase = 118; continue; };
  1174. { gotoCase = 114; continue; };
  1175. } else {
  1176. if (yych <= '`') { gotoCase = 118; continue; };
  1177. if (yych <= 'z') { gotoCase = 114; continue; };
  1178. { gotoCase = 118; continue; };
  1179. }
  1180. }
  1181. }
  1182. case 116:
  1183. ++cursor;
  1184. if ((yych = this._charAt(cursor)) <= '<') {
  1185. if (yych <= '\'') {
  1186. if (yych <= ' ') { gotoCase = 117; continue; };
  1187. if (yych <= '"') { gotoCase = 50; continue; };
  1188. if (yych >= '&') { gotoCase = 50; continue; };
  1189. } else {
  1190. if (yych <= '-') {
  1191. if (yych >= '-') { gotoCase = 50; continue; };
  1192. } else {
  1193. if (yych <= '.') { gotoCase = 117; continue; };
  1194. if (yych <= '9') { gotoCase = 50; continue; };
  1195. }
  1196. }
  1197. } else {
  1198. if (yych <= ']') {
  1199. if (yych <= '?') {
  1200. if (yych <= '=') { gotoCase = 50; continue; };
  1201. } else {
  1202. if (yych != '\\') { gotoCase = 50; continue; };
  1203. }
  1204. } else {
  1205. if (yych <= '_') {
  1206. if (yych >= '_') { gotoCase = 50; continue; };
  1207. } else {
  1208. if (yych <= '`') { gotoCase = 117; continue; };
  1209. if (yych <= 'z') { gotoCase = 50; continue; };
  1210. }
  1211. }
  1212. }
  1213. case 117:
  1214. { return this._stringToken(cursor, true); }
  1215. case 118:
  1216. ++cursor;
  1217. yych = this._charAt(cursor);
  1218. if (yych <= '\r') {
  1219. if (yych == '\n') { gotoCase = 68; continue; };
  1220. if (yych <= '\f') { gotoCase = 118; continue; };
  1221. { gotoCase = 68; continue; };
  1222. } else {
  1223. if (yych <= '\'') {
  1224. if (yych <= '&') { gotoCase = 118; continue; };
  1225. { gotoCase = 123; continue; };
  1226. } else {
  1227. if (yych != '\\') { gotoCase = 118; continue; };
  1228. }
  1229. }
  1230. case 120:
  1231. ++cursor;
  1232. yych = this._charAt(cursor);
  1233. if (yych <= 'a') {
  1234. if (yych <= '!') {
  1235. if (yych <= '\n') {
  1236. if (yych <= '\t') { gotoCase = 68; continue; };
  1237. } else {
  1238. if (yych != '\r') { gotoCase = 68; continue; };
  1239. }
  1240. } else {
  1241. if (yych <= '\'') {
  1242. if (yych <= '"') { gotoCase = 118; continue; };
  1243. if (yych <= '&') { gotoCase = 68; continue; };
  1244. { gotoCase = 118; continue; };
  1245. } else {
  1246. if (yych == '\\') { gotoCase = 118; continue; };
  1247. { gotoCase = 68; continue; };
  1248. }
  1249. }
  1250. } else {
  1251. if (yych <= 'q') {
  1252. if (yych <= 'f') {
  1253. if (yych <= 'b') { gotoCase = 118; continue; };
  1254. if (yych <= 'e') { gotoCase = 68; continue; };
  1255. { gotoCase = 118; continue; };
  1256. } else {
  1257. if (yych == 'n') { gotoCase = 118; continue; };
  1258. { gotoCase = 68; continue; };
  1259. }
  1260. } else {
  1261. if (yych <= 't') {
  1262. if (yych == 's') { gotoCase = 68; continue; };
  1263. { gotoCase = 118; continue; };
  1264. } else {
  1265. if (yych == 'v') { gotoCase = 118; continue; };
  1266. { gotoCase = 68; continue; };
  1267. }
  1268. }
  1269. }
  1270. ++cursor;
  1271. this.setLexCondition(this._lexConditions.SSTRING);
  1272. { return this._stringToken(cursor); }
  1273. case 123:
  1274. yych = this._charAt(++cursor);
  1275. { gotoCase = 117; continue; };
  1276. case 124:
  1277. ++cursor;
  1278. yych = this._charAt(cursor);
  1279. if (yych <= '<') {
  1280. if (yych <= '\'') {
  1281. if (yych <= ' ') { gotoCase = 126; continue; };
  1282. if (yych <= '"') { gotoCase = 124; continue; };
  1283. if (yych >= '&') { gotoCase = 124; continue; };
  1284. } else {
  1285. if (yych <= '-') {
  1286. if (yych >= '-') { gotoCase = 124; continue; };
  1287. } else {
  1288. if (yych <= '.') { gotoCase = 126; continue; };
  1289. if (yych <= '9') { gotoCase = 124; continue; };
  1290. }
  1291. }
  1292. } else {
  1293. if (yych <= ']') {
  1294. if (yych <= '?') {
  1295. if (yych <= '=') { gotoCase = 124; continue; };
  1296. } else {
  1297. if (yych != '\\') { gotoCase = 124; continue; };
  1298. }
  1299. } else {
  1300. if (yych <= '_') {
  1301. if (yych >= '_') { gotoCase = 124; continue; };
  1302. } else {
  1303. if (yych <= '`') { gotoCase = 126; continue; };
  1304. if (yych <= 'z') { gotoCase = 124; continue; };
  1305. }
  1306. }
  1307. }
  1308. case 126:
  1309. {
  1310. if (this._condition.parseCondition === this._condition.parseCondition.INITIAL || this._condition.parseCondition === this._condition.parseCondition.AT_RULE)
  1311. this._setParseCondition(this._parseConditions.PROPERTY);
  1312. this.tokenType = "scss-variable";
  1313. return cursor;
  1314. }
  1315. case 127:
  1316. ++cursor;
  1317. yych = this._charAt(cursor);
  1318. if (yych <= '@') {
  1319. if (yych <= '/') { gotoCase = 129; continue; };
  1320. if (yych <= '9') { gotoCase = 127; continue; };
  1321. } else {
  1322. if (yych <= 'Z') { gotoCase = 127; continue; };
  1323. if (yych <= '`') { gotoCase = 129; continue; };
  1324. if (yych <= 'z') { gotoCase = 127; continue; };
  1325. }
  1326. case 129:
  1327. {
  1328. if (this._isPropertyValue())
  1329. this.tokenType = "css-color";
  1330. else if (this._condition.parseCondition === this._parseConditions.INITIAL)
  1331. this.tokenType = "css-selector";
  1332. else
  1333. this.tokenType = null;
  1334. return cursor;
  1335. }
  1336. case 130:
  1337. yyaccept = 0;
  1338. YYMARKER = ++cursor;
  1339. yych = this._charAt(cursor);
  1340. if (yych <= '.') {
  1341. if (yych <= '!') {
  1342. if (yych <= '\f') {
  1343. if (yych == '\n') { gotoCase = 32; continue; };
  1344. } else {
  1345. if (yych <= '\r') { gotoCase = 32; continue; };
  1346. if (yych >= '!') { gotoCase = 130; continue; };
  1347. }
  1348. } else {
  1349. if (yych <= '\'') {
  1350. if (yych <= '"') { gotoCase = 116; continue; };
  1351. if (yych >= '&') { gotoCase = 130; continue; };
  1352. } else {
  1353. if (yych == '-') { gotoCase = 130; continue; };
  1354. }
  1355. }
  1356. } else {
  1357. if (yych <= '\\') {
  1358. if (yych <= '=') {
  1359. if (yych <= '9') { gotoCase = 130; continue; };
  1360. if (yych >= '=') { gotoCase = 130; continue; };
  1361. } else {
  1362. if (yych <= '?') { gotoCase = 132; continue; };
  1363. if (yych <= '[') { gotoCase = 130; continue; };
  1364. { gotoCase = 134; continue; };
  1365. }
  1366. } else {
  1367. if (yych <= '_') {
  1368. if (yych != '^') { gotoCase = 130; continue; };
  1369. } else {
  1370. if (yych <= '`') { gotoCase = 132; continue; };
  1371. if (yych <= 'z') { gotoCase = 130; continue; };
  1372. }
  1373. }
  1374. }
  1375. case 132:
  1376. ++cursor;
  1377. yych = this._charAt(cursor);
  1378. if (yych <= '\r') {
  1379. if (yych == '\n') { gotoCase = 68; continue; };
  1380. if (yych <= '\f') { gotoCase = 132; continue; };
  1381. { gotoCase = 68; continue; };
  1382. } else {
  1383. if (yych <= '"') {
  1384. if (yych <= '!') { gotoCase = 132; continue; };
  1385. { gotoCase = 123; continue; };
  1386. } else {
  1387. if (yych != '\\') { gotoCase = 132; continue; };
  1388. }
  1389. }
  1390. case 134:
  1391. ++cursor;
  1392. yych = this._charAt(cursor);
  1393. if (yych <= 'a') {
  1394. if (yych <= '!') {
  1395. if (yych <= '\n') {
  1396. if (yych <= '\t') { gotoCase = 68; continue; };
  1397. } else {
  1398. if (yych != '\r') { gotoCase = 68; continue; };
  1399. }
  1400. } else {
  1401. if (yych <= '\'') {
  1402. if (yych <= '"') { gotoCase = 132; continue; };
  1403. if (yych <= '&') { gotoCase = 68; continue; };
  1404. { gotoCase = 132; continue; };
  1405. } else {
  1406. if (yych == '\\') { gotoCase = 132; continue; };
  1407. { gotoCase = 68; continue; };
  1408. }
  1409. }
  1410. } else {
  1411. if (yych <= 'q') {
  1412. if (yych <= 'f') {
  1413. if (yych <= 'b') { gotoCase = 132; continue; };
  1414. if (yych <= 'e') { gotoCase = 68; continue; };
  1415. { gotoCase = 132; continue; };
  1416. } else {
  1417. if (yych == 'n') { gotoCase = 132; continue; };
  1418. { gotoCase = 68; continue; };
  1419. }
  1420. } else {
  1421. if (yych <= 't') {
  1422. if (yych == 's') { gotoCase = 68; continue; };
  1423. { gotoCase = 132; continue; };
  1424. } else {
  1425. if (yych == 'v') { gotoCase = 132; continue; };
  1426. { gotoCase = 68; continue; };
  1427. }
  1428. }
  1429. }
  1430. ++cursor;
  1431. this.setLexCondition(this._lexConditions.DSTRING);
  1432. { return this._stringToken(cursor); }
  1433. /* *********************************** */
  1434. case this.case_SSTRING:
  1435. yych = this._charAt(cursor);
  1436. if (yych <= '\r') {
  1437. if (yych == '\n') { gotoCase = 141; continue; };
  1438. if (yych <= '\f') { gotoCase = 140; continue; };
  1439. { gotoCase = 141; continue; };
  1440. } else {
  1441. if (yych <= '\'') {
  1442. if (yych <= '&') { gotoCase = 140; continue; };
  1443. { gotoCase = 143; continue; };
  1444. } else {
  1445. if (yych == '\\') { gotoCase = 145; continue; };
  1446. { gotoCase = 140; continue; };
  1447. }
  1448. }
  1449. case 139:
  1450. { return this._stringToken(cursor); }
  1451. case 140:
  1452. yyaccept = 0;
  1453. yych = this._charAt(YYMARKER = ++cursor);
  1454. { gotoCase = 147; continue; };
  1455. case 141:
  1456. ++cursor;
  1457. case 142:
  1458. { this.tokenType = null; return cursor; }
  1459. case 143:
  1460. ++cursor;
  1461. case 144:
  1462. this.setLexCondition(this._lexConditions.INITIAL);
  1463. { return this._stringToken(cursor, true); }
  1464. case 145:
  1465. yych = this._charAt(++cursor);
  1466. if (yych <= 'e') {
  1467. if (yych <= '\'') {
  1468. if (yych == '"') { gotoCase = 146; continue; };
  1469. if (yych <= '&') { gotoCase = 142; continue; };
  1470. } else {
  1471. if (yych <= '\\') {
  1472. if (yych <= '[') { gotoCase = 142; continue; };
  1473. } else {
  1474. if (yych != 'b') { gotoCase = 142; continue; };
  1475. }
  1476. }
  1477. } else {
  1478. if (yych <= 'r') {
  1479. if (yych <= 'm') {
  1480. if (yych >= 'g') { gotoCase = 142; continue; };
  1481. } else {
  1482. if (yych <= 'n') { gotoCase = 146; continue; };
  1483. if (yych <= 'q') { gotoCase = 142; continue; };
  1484. }
  1485. } else {
  1486. if (yych <= 't') {
  1487. if (yych <= 's') { gotoCase = 142; continue; };
  1488. } else {
  1489. if (yych != 'v') { gotoCase = 142; continue; };
  1490. }
  1491. }
  1492. }
  1493. case 146:
  1494. yyaccept = 0;
  1495. YYMARKER = ++cursor;
  1496. yych = this._charAt(cursor);
  1497. case 147:
  1498. if (yych <= '\r') {
  1499. if (yych == '\n') { gotoCase = 139; continue; };
  1500. if (yych <= '\f') { gotoCase = 146; continue; };
  1501. { gotoCase = 139; continue; };
  1502. } else {
  1503. if (yych <= '\'') {
  1504. if (yych <= '&') { gotoCase = 146; continue; };
  1505. { gotoCase = 150; continue; };
  1506. } else {
  1507. if (yych != '\\') { gotoCase = 146; continue; };
  1508. }
  1509. }
  1510. ++cursor;
  1511. yych = this._charAt(cursor);
  1512. if (yych <= 'e') {
  1513. if (yych <= '\'') {
  1514. if (yych == '"') { gotoCase = 146; continue; };
  1515. if (yych >= '\'') { gotoCase = 146; continue; };
  1516. } else {
  1517. if (yych <= '\\') {
  1518. if (yych >= '\\') { gotoCase = 146; continue; };
  1519. } else {
  1520. if (yych == 'b') { gotoCase = 146; continue; };
  1521. }
  1522. }
  1523. } else {
  1524. if (yych <= 'r') {
  1525. if (yych <= 'm') {
  1526. if (yych <= 'f') { gotoCase = 146; continue; };
  1527. } else {
  1528. if (yych <= 'n') { gotoCase = 146; continue; };
  1529. if (yych >= 'r') { gotoCase = 146; continue; };
  1530. }
  1531. } else {
  1532. if (yych <= 't') {
  1533. if (yych >= 't') { gotoCase = 146; continue; };
  1534. } else {
  1535. if (yych == 'v') { gotoCase = 146; continue; };
  1536. }
  1537. }
  1538. }
  1539. cursor = YYMARKER;
  1540. { gotoCase = 139; continue; };
  1541. case 150:
  1542. ++cursor;
  1543. yych = this._charAt(cursor);
  1544. { gotoCase = 144; continue; };
  1545. }
  1546. }
  1547. },
  1548. __proto__: WebInspector.SourceTokenizer.prototype
  1549. }