repl-sdk 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apl-fqmucPXA.js +141 -0
- package/dist/apl-fqmucPXA.js.map +1 -0
- package/dist/asciiarmor-DucZyvP0.js +57 -0
- package/dist/asciiarmor-DucZyvP0.js.map +1 -0
- package/dist/asn1-BnOEsgAm.js +145 -0
- package/dist/asn1-BnOEsgAm.js.map +1 -0
- package/dist/assets/{tar-worker-kdkltuRC.js → tar-worker-CxTcoQcr.js} +1 -6
- package/dist/assets/{tar-worker-kdkltuRC.js.map → tar-worker-CxTcoQcr.js.map} +1 -1
- package/dist/asterisk-QAlztEwS.js +346 -0
- package/dist/asterisk-QAlztEwS.js.map +1 -0
- package/dist/brainfuck-DZVCuF_t.js +54 -0
- package/dist/brainfuck-DZVCuF_t.js.map +1 -0
- package/dist/clike-CTYGlS6x.js +800 -0
- package/dist/clike-CTYGlS6x.js.map +1 -0
- package/dist/clojure-BhXMqnxz.js +850 -0
- package/dist/clojure-BhXMqnxz.js.map +1 -0
- package/dist/cmake-BGaNd9E7.js +72 -0
- package/dist/cmake-BGaNd9E7.js.map +1 -0
- package/dist/cobol-4yqQntpt.js +121 -0
- package/dist/cobol-4yqQntpt.js.map +1 -0
- package/dist/codemirror-De3S70Np.js +2912 -0
- package/dist/codemirror-De3S70Np.js.map +1 -0
- package/dist/coffeescript-D2dXvhEc.js +309 -0
- package/dist/coffeescript-D2dXvhEc.js.map +1 -0
- package/dist/commonlisp-CF_VNHQR.js +131 -0
- package/dist/commonlisp-CF_VNHQR.js.map +1 -0
- package/dist/crystal-DyuLTqLs.js +399 -0
- package/dist/crystal-DyuLTqLs.js.map +1 -0
- package/dist/css-DkSyTW67.js +1773 -0
- package/dist/css-DkSyTW67.js.map +1 -0
- package/dist/cypher-Dlu_3r4V.js +122 -0
- package/dist/cypher-Dlu_3r4V.js.map +1 -0
- package/dist/d-UURgV0Ux.js +180 -0
- package/dist/d-UURgV0Ux.js.map +1 -0
- package/dist/diff-B_Bi2Crb.js +26 -0
- package/dist/diff-B_Bi2Crb.js.map +1 -0
- package/dist/dockerfile-Bvk733Ga.js +202 -0
- package/dist/dockerfile-Bvk733Ga.js.map +1 -0
- package/dist/dtd-Dy74G54E.js +115 -0
- package/dist/dtd-Dy74G54E.js.map +1 -0
- package/dist/dylan-TSb-Nfix.js +315 -0
- package/dist/dylan-TSb-Nfix.js.map +1 -0
- package/dist/ebnf-4fKAGW3a.js +141 -0
- package/dist/ebnf-4fKAGW3a.js.map +1 -0
- package/dist/ecl-B59qGGVg.js +179 -0
- package/dist/ecl-B59qGGVg.js.map +1 -0
- package/dist/eiffel-Dze7nlu3.js +135 -0
- package/dist/eiffel-Dze7nlu3.js.map +1 -0
- package/dist/elm-DG7jkhNZ.js +177 -0
- package/dist/elm-DG7jkhNZ.js.map +1 -0
- package/dist/erlang-BO6gOnGA.js +675 -0
- package/dist/erlang-BO6gOnGA.js.map +1 -0
- package/dist/factor-CMxFHDqz.js +66 -0
- package/dist/factor-CMxFHDqz.js.map +1 -0
- package/dist/fcl-CDDUNjTj.js +142 -0
- package/dist/fcl-CDDUNjTj.js.map +1 -0
- package/dist/forth-B9D2JCeE.js +117 -0
- package/dist/forth-B9D2JCeE.js.map +1 -0
- package/dist/fortran-CAG2BFbe.js +468 -0
- package/dist/fortran-CAG2BFbe.js.map +1 -0
- package/dist/gas-0Aw8zDr5.js +294 -0
- package/dist/gas-0Aw8zDr5.js.map +1 -0
- package/dist/gherkin-DhZlEZiy.js +116 -0
- package/dist/gherkin-DhZlEZiy.js.map +1 -0
- package/dist/{gjs-CzFzkEFv.js → gjs-DfguZDLq.js} +4 -4
- package/dist/gjs-DfguZDLq.js.map +1 -0
- package/dist/{gmd-D9OXs2v3.js → gmd-Yas-Oo8k.js} +3 -6
- package/dist/gmd-Yas-Oo8k.js.map +1 -0
- package/dist/groovy-CpwJiBl7.js +224 -0
- package/dist/groovy-CpwJiBl7.js.map +1 -0
- package/dist/haskell-ySd-OUo8.js +460 -0
- package/dist/haskell-ySd-OUo8.js.map +1 -0
- package/dist/haxe-7MlzfeYV.js +515 -0
- package/dist/haxe-7MlzfeYV.js.map +1 -0
- package/dist/{hbs-CuhWjffM.js → hbs-CxcmWxSJ.js} +2 -2
- package/dist/{hbs-CuhWjffM.js.map → hbs-CxcmWxSJ.js.map} +1 -1
- package/dist/http-BqypyemW.js +80 -0
- package/dist/http-BqypyemW.js.map +1 -0
- package/dist/idl-4HIGJlDI.js +986 -0
- package/dist/idl-4HIGJlDI.js.map +1 -0
- package/dist/index-B3Meoznj.js +118 -0
- package/dist/index-B3Meoznj.js.map +1 -0
- package/dist/index-BQyfDUUx.js +692 -0
- package/dist/index-BQyfDUUx.js.map +1 -0
- package/dist/index-BRDroAD8.js +305 -0
- package/dist/index-BRDroAD8.js.map +1 -0
- package/dist/index-BRMAzRyM.js +179 -0
- package/dist/index-BRMAzRyM.js.map +1 -0
- package/dist/index-Bb8uYQgv.js +927 -0
- package/dist/index-Bb8uYQgv.js.map +1 -0
- package/dist/index-BlOjO66K.js +17618 -0
- package/dist/index-BlOjO66K.js.map +1 -0
- package/dist/index-BoGWnSNL.js +706 -0
- package/dist/index-BoGWnSNL.js.map +1 -0
- package/dist/index-BsRrEiOu.js +98 -0
- package/dist/index-BsRrEiOu.js.map +1 -0
- package/dist/index-C2sFZMth.js +391 -0
- package/dist/index-C2sFZMth.js.map +1 -0
- package/dist/index-C7xwOjmS.js +291 -0
- package/dist/index-C7xwOjmS.js.map +1 -0
- package/dist/index-CA3lFUx6.js +315 -0
- package/dist/index-CA3lFUx6.js.map +1 -0
- package/dist/index-CB-pPTIf.js +98 -0
- package/dist/index-CB-pPTIf.js.map +1 -0
- package/dist/index-CCa6x1FE.js +386 -0
- package/dist/index-CCa6x1FE.js.map +1 -0
- package/dist/index-CD4DINI1.js +158 -0
- package/dist/index-CD4DINI1.js.map +1 -0
- package/dist/index-CE0B_fcG.js +328 -0
- package/dist/index-CE0B_fcG.js.map +1 -0
- package/dist/{index-CUWCqMoD.js → index-CVGAEPMV.js} +33 -27
- package/dist/index-CVGAEPMV.js.map +1 -0
- package/dist/index-CmaT2afn.js +332 -0
- package/dist/index-CmaT2afn.js.map +1 -0
- package/dist/index-D8sUxXp5.js +83 -0
- package/dist/index-D8sUxXp5.js.map +1 -0
- package/dist/index-DIz8Vpn-.js +737 -0
- package/dist/index-DIz8Vpn-.js.map +1 -0
- package/dist/index-DNP1xT-S.js +408 -0
- package/dist/index-DNP1xT-S.js.map +1 -0
- package/dist/index-DOAqdvnQ.js +862 -0
- package/dist/index-DOAqdvnQ.js.map +1 -0
- package/dist/index-DVUMFbgi.js +152 -0
- package/dist/index-DVUMFbgi.js.map +1 -0
- package/dist/index-VeTBKRVd.js +83 -0
- package/dist/index-VeTBKRVd.js.map +1 -0
- package/dist/index-dXZeR7Bx.js +1767 -0
- package/dist/index-dXZeR7Bx.js.map +1 -0
- package/dist/index-gtqbIb6T.js +62 -0
- package/dist/index-gtqbIb6T.js.map +1 -0
- package/dist/index-pN_pUAQ7.js +2426 -0
- package/dist/index-pN_pUAQ7.js.map +1 -0
- package/dist/index-wasu5VX0.js +1150 -0
- package/dist/index-wasu5VX0.js.map +1 -0
- package/dist/javascript-Bt8B7yTi.js +993 -0
- package/dist/javascript-Bt8B7yTi.js.map +1 -0
- package/dist/julia-Bs6JJhYG.js +408 -0
- package/dist/julia-Bs6JJhYG.js.map +1 -0
- package/dist/livescript-DmzgM3Yt.js +297 -0
- package/dist/livescript-DmzgM3Yt.js.map +1 -0
- package/dist/lua-8cJgIlqe.js +257 -0
- package/dist/lua-8cJgIlqe.js.map +1 -0
- package/dist/mathematica-DNLOL9PQ.js +111 -0
- package/dist/mathematica-DNLOL9PQ.js.map +1 -0
- package/dist/mbox-Ga7d4MMN.js +118 -0
- package/dist/mbox-Ga7d4MMN.js.map +1 -0
- package/dist/mirc-Dma3B8rS.js +108 -0
- package/dist/mirc-Dma3B8rS.js.map +1 -0
- package/dist/mllike-DHn7xckP.js +335 -0
- package/dist/mllike-DHn7xckP.js.map +1 -0
- package/dist/modelica-0d55jYY0.js +148 -0
- package/dist/modelica-0d55jYY0.js.map +1 -0
- package/dist/mscgen-DdqZYINH.js +136 -0
- package/dist/mscgen-DdqZYINH.js.map +1 -0
- package/dist/mumps-Btr8VblO.js +94 -0
- package/dist/mumps-Btr8VblO.js.map +1 -0
- package/dist/nginx-DTDtBDVN.js +142 -0
- package/dist/nginx-DTDtBDVN.js.map +1 -0
- package/dist/nsis-3zG7tgur.js +63 -0
- package/dist/nsis-3zG7tgur.js.map +1 -0
- package/dist/ntriples-CvgOYMpL.js +154 -0
- package/dist/ntriples-CvgOYMpL.js.map +1 -0
- package/dist/octave-DYBj3-tl.js +201 -0
- package/dist/octave-DYBj3-tl.js.map +1 -0
- package/dist/oz-R_e8WMIi.js +232 -0
- package/dist/oz-R_e8WMIi.js.map +1 -0
- package/dist/parse-CAqQaKsh.js +21685 -0
- package/dist/parse-CAqQaKsh.js.map +1 -0
- package/dist/pascal-GD8iposT.js +106 -0
- package/dist/pascal-GD8iposT.js.map +1 -0
- package/dist/perl-DL9mHpoi.js +1106 -0
- package/dist/perl-DL9mHpoi.js.map +1 -0
- package/dist/pig-C_4T4YIV.js +102 -0
- package/dist/pig-C_4T4YIV.js.map +1 -0
- package/dist/powershell-B0suO7Vd.js +329 -0
- package/dist/powershell-B0suO7Vd.js.map +1 -0
- package/dist/properties-BR-vP1aU.js +59 -0
- package/dist/properties-BR-vP1aU.js.map +1 -0
- package/dist/protobuf-BxgpyhoW.js +78 -0
- package/dist/protobuf-BxgpyhoW.js.map +1 -0
- package/dist/pug-vHnWR0UE.js +406 -0
- package/dist/pug-vHnWR0UE.js.map +1 -0
- package/dist/puppet-Bdao66PW.js +138 -0
- package/dist/puppet-Bdao66PW.js.map +1 -0
- package/dist/python-BFGRmuZ9.js +427 -0
- package/dist/python-BFGRmuZ9.js.map +1 -0
- package/dist/q-CrbCVq4a.js +132 -0
- package/dist/q-CrbCVq4a.js.map +1 -0
- package/dist/r-V7nswm59.js +171 -0
- package/dist/r-V7nswm59.js.map +1 -0
- package/dist/repl-sdk.js +7 -0
- package/dist/repl-sdk.js.map +1 -0
- package/dist/rpm-C-DLY-If.js +110 -0
- package/dist/rpm-C-DLY-If.js.map +1 -0
- package/dist/ruby-JDKLJNK0.js +331 -0
- package/dist/ruby-JDKLJNK0.js.map +1 -0
- package/dist/sas-D2UG-yhZ.js +208 -0
- package/dist/sas-D2UG-yhZ.js.map +1 -0
- package/dist/scheme-BKzrkGJD.js +223 -0
- package/dist/scheme-BKzrkGJD.js.map +1 -0
- package/dist/shell-BlsXDxCn.js +223 -0
- package/dist/shell-BlsXDxCn.js.map +1 -0
- package/dist/sieve-CjwBwOY5.js +136 -0
- package/dist/sieve-CjwBwOY5.js.map +1 -0
- package/dist/simple-mode-DMneyfDu.js +131 -0
- package/dist/simple-mode-DMneyfDu.js.map +1 -0
- package/dist/smalltalk-BOIGQuhN.js +122 -0
- package/dist/smalltalk-BOIGQuhN.js.map +1 -0
- package/dist/solr-CwD7U71z.js +70 -0
- package/dist/solr-CwD7U71z.js.map +1 -0
- package/dist/sparql-DYskk2vE.js +250 -0
- package/dist/sparql-DYskk2vE.js.map +1 -0
- package/dist/spreadsheet-Bgtt3oLP.js +88 -0
- package/dist/spreadsheet-Bgtt3oLP.js.map +1 -0
- package/dist/sql-Cei9CMfk.js +343 -0
- package/dist/sql-Cei9CMfk.js.map +1 -0
- package/dist/stex-C1nZSzAw.js +231 -0
- package/dist/stex-C1nZSzAw.js.map +1 -0
- package/dist/stylus-BkS-boTH.js +566 -0
- package/dist/stylus-BkS-boTH.js.map +1 -0
- package/dist/swift-FRZi1uvB.js +292 -0
- package/dist/swift-FRZi1uvB.js.map +1 -0
- package/dist/tcl-CUcaCdmq.js +115 -0
- package/dist/tcl-CUcaCdmq.js.map +1 -0
- package/dist/textile-BnFpjsrl.js +415 -0
- package/dist/textile-BnFpjsrl.js.map +1 -0
- package/dist/tiddlywiki-CjprD-Qp.js +219 -0
- package/dist/tiddlywiki-CjprD-Qp.js.map +1 -0
- package/dist/tiki-DK9DOeWn.js +269 -0
- package/dist/tiki-DK9DOeWn.js.map +1 -0
- package/dist/toml-BOuWGMcf.js +77 -0
- package/dist/toml-BOuWGMcf.js.map +1 -0
- package/dist/troff-E1bJ0PPL.js +62 -0
- package/dist/troff-E1bJ0PPL.js.map +1 -0
- package/dist/ttcn-cfg-Dc39-fIP.js +134 -0
- package/dist/ttcn-cfg-Dc39-fIP.js.map +1 -0
- package/dist/ttcn-tKd4HLu4.js +193 -0
- package/dist/ttcn-tKd4HLu4.js.map +1 -0
- package/dist/turtle-Dq7-1WAf.js +125 -0
- package/dist/turtle-Dq7-1WAf.js.map +1 -0
- package/dist/vb-Dp90gtsv.js +197 -0
- package/dist/vb-Dp90gtsv.js.map +1 -0
- package/dist/vbscript-Bfn8O8I7.js +479 -0
- package/dist/vbscript-Bfn8O8I7.js.map +1 -0
- package/dist/velocity-BwIZK1TH.js +150 -0
- package/dist/velocity-BwIZK1TH.js.map +1 -0
- package/dist/verilog-CnT9bMk0.js +430 -0
- package/dist/verilog-CnT9bMk0.js.map +1 -0
- package/dist/vhdl-DCkMIyT9.js +159 -0
- package/dist/vhdl-DCkMIyT9.js.map +1 -0
- package/dist/webidl-BTLTThCm.js +205 -0
- package/dist/webidl-BTLTThCm.js.map +1 -0
- package/dist/xquery-BrBUuxMR.js +526 -0
- package/dist/xquery-BrBUuxMR.js.map +1 -0
- package/dist/yacas-b5lAVEIl.js +131 -0
- package/dist/yacas-b5lAVEIl.js.map +1 -0
- package/dist/z80-ClgwfNdB.js +93 -0
- package/dist/z80-ClgwfNdB.js.map +1 -0
- package/package.json +10 -11
- package/src/compilers/ember/gjs.js +2 -2
- package/src/compilers/ember/gmd.js +1 -1
- package/src/compilers/markdown.js +1 -1
- package/src/compilers/react.js +15 -3
- package/dist/codemirror-D4aIVflZ.js +0 -110
- package/dist/codemirror-D4aIVflZ.js.map +0 -1
- package/dist/gjs-CzFzkEFv.js.map +0 -1
- package/dist/gmd-D9OXs2v3.js.map +0 -1
- package/dist/index-CUWCqMoD.js.map +0 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/parse-aBKk9rfS.js +0 -328
- package/dist/parse-aBKk9rfS.js.map +0 -1
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
var tagKeywords_ = ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "bgsound", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "marquee", "menu", "menuitem", "meta", "meter", "nav", "nobr", "noframes", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "var", "video"];
|
|
2
|
+
var documentTypes_ = ["domain", "regexp", "url-prefix", "url"];
|
|
3
|
+
var mediaTypes_ = ["all", "aural", "braille", "handheld", "print", "projection", "screen", "tty", "tv", "embossed"];
|
|
4
|
+
var mediaFeatures_ = ["width", "min-width", "max-width", "height", "min-height", "max-height", "device-width", "min-device-width", "max-device-width", "device-height", "min-device-height", "max-device-height", "aspect-ratio", "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio", "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color", "max-color", "color-index", "min-color-index", "max-color-index", "monochrome", "min-monochrome", "max-monochrome", "resolution", "min-resolution", "max-resolution", "scan", "grid", "dynamic-range", "video-dynamic-range"];
|
|
5
|
+
var propertyKeywords_ = ["align-content", "align-items", "align-self", "alignment-adjust", "alignment-baseline", "anchor-point", "animation", "animation-delay", "animation-direction", "animation-duration", "animation-fill-mode", "animation-iteration-count", "animation-name", "animation-play-state", "animation-timing-function", "appearance", "azimuth", "backface-visibility", "background", "background-attachment", "background-clip", "background-color", "background-image", "background-origin", "background-position", "background-repeat", "background-size", "baseline-shift", "binding", "bleed", "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target", "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", "border-collapse", "border-color", "border-image", "border-image-outset", "border-image-repeat", "border-image-slice", "border-image-source", "border-image-width", "border-left", "border-left-color", "border-left-style", "border-left-width", "border-radius", "border-right", "border-right-color", "border-right-style", "border-right-width", "border-spacing", "border-style", "border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width", "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", "caption-side", "clear", "clip", "color", "color-profile", "column-count", "column-fill", "column-gap", "column-rule", "column-rule-color", "column-rule-style", "column-rule-width", "column-span", "column-width", "columns", "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after", "cue-before", "cursor", "direction", "display", "dominant-baseline", "drop-initial-after-adjust", "drop-initial-after-align", "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size", "drop-initial-value", "elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings", "font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-synthesis", "font-variant", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position", "font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-position", "grid-auto-rows", "grid-column", "grid-column-end", "grid-column-start", "grid-row", "grid-row-end", "grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns", "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon", "image-orientation", "image-rendering", "image-resolution", "inline-box-align", "justify-content", "left", "letter-spacing", "line-break", "line-height", "line-stacking", "line-stacking-ruby", "line-stacking-shift", "line-stacking-strategy", "list-style", "list-style-image", "list-style-position", "list-style-type", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "marker-offset", "marks", "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed", "marquee-style", "max-height", "max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index", "nav-left", "nav-right", "nav-up", "object-fit", "object-position", "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", "page", "page-break-after", "page-break-before", "page-break-inside", "page-policy", "pause", "pause-after", "pause-before", "perspective", "perspective-origin", "pitch", "pitch-range", "play-during", "position", "presentation-level", "punctuation-trim", "quotes", "region-break-after", "region-break-before", "region-break-inside", "region-fragment", "rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness", "right", "rotation", "rotation-point", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span", "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside", "size", "speak", "speak-as", "speak-header", "speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size", "table-layout", "target", "target-name", "target-new", "target-position", "text-align", "text-align-last", "text-decoration", "text-decoration-color", "text-decoration-line", "text-decoration-skip", "text-decoration-style", "text-emphasis", "text-emphasis-color", "text-emphasis-position", "text-emphasis-style", "text-height", "text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow", "text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position", "text-wrap", "top", "transform", "transform-origin", "transform-style", "transition", "transition-delay", "transition-duration", "transition-property", "transition-timing-function", "unicode-bidi", "vertical-align", "visibility", "voice-balance", "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress", "voice-volume", "volume", "white-space", "widows", "width", "will-change", "word-break", "word-spacing", "word-wrap", "z-index", "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color", "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events", "color-interpolation", "color-interpolation-filters", "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering", "marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering", "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal", "glyph-orientation-vertical", "text-anchor", "writing-mode", "font-smoothing", "osx-font-smoothing"];
|
|
6
|
+
var nonStandardPropertyKeywords_ = ["scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color", "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color", "scrollbar-3d-light-color", "scrollbar-track-color", "shape-inside", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button", "searchfield-results-decoration", "zoom"];
|
|
7
|
+
var fontProperties_ = ["font-family", "src", "unicode-range", "font-variant", "font-feature-settings", "font-stretch", "font-weight", "font-style"];
|
|
8
|
+
var colorKeywords_ = ["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen"];
|
|
9
|
+
var valueKeywords_ = ["above", "absolute", "activeborder", "additive", "activecaption", "afar", "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate", "always", "amharic", "amharic-abegede", "antialiased", "appworkspace", "arabic-indic", "armenian", "asterisks", "attr", "auto", "avoid", "avoid-column", "avoid-page", "avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary", "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box", "both", "bottom", "break", "break-all", "break-word", "bullets", "button", "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian", "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch", "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote", "col-resize", "collapse", "column", "compact", "condensed", "conic-gradient", "contain", "content", "contents", "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop", "cross", "crosshair", "currentcolor", "cursive", "cyclic", "dashed", "decimal", "decimal-leading-zero", "default", "default-button", "destination-atop", "destination-in", "destination-out", "destination-over", "devanagari", "disc", "discard", "disclosure-closed", "disclosure-open", "document", "dot-dash", "dot-dot-dash", "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er", "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et", "ethiopic-halehame-gez", "ethiopic-halehame-om-et", "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "ethiopic-numeric", "ew-resize", "expanded", "extends", "extra-condensed", "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "footnotes", "forwards", "from", "geometricPrecision", "georgian", "graytext", "groove", "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew", "help", "hidden", "hide", "high", "higher", "highlight", "highlighttext", "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore", "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis", "inline-block", "inline-flex", "inline-table", "inset", "inside", "intrinsic", "invert", "italic", "japanese-formal", "japanese-informal", "justify", "kannada", "katakana", "katakana-iroha", "keep-all", "khmer", "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal", "landscape", "lao", "large", "larger", "left", "level", "lighter", "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem", "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian", "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian", "lower-roman", "lowercase", "ltr", "malayalam", "match", "matrix", "matrix3d", "media-play-button", "media-slider", "media-sliderthumb", "media-volume-slider", "media-volume-sliderthumb", "medium", "menu", "menulist", "menulist-button", "menutext", "message-box", "middle", "min-intrinsic", "mix", "mongolian", "monospace", "move", "multiple", "myanmar", "n-resize", "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap", "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote", "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset", "outside", "outside-shape", "overlay", "overline", "padding", "padding-box", "painted", "page", "paused", "persian", "perspective", "plus-darker", "plus-lighter", "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "push-button", "radial-gradient", "radio", "read-only", "read-write", "read-write-plaintext-only", "rectangle", "region", "relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient", "repeating-conic-gradient", "repeat-x", "repeat-y", "reset", "reverse", "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY", "rotateZ", "round", "row-resize", "rtl", "run-in", "running", "s-resize", "sans-serif", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield", "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button", "searchfield-results-decoration", "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", "simp-chinese-formal", "simp-chinese-informal", "single", "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal", "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", "small", "small-caps", "small-caption", "smaller", "solid", "somali", "source-atop", "source-in", "source-out", "source-over", "space", "spell-out", "square", "square-button", "standard", "start", "static", "status-bar", "stretch", "stroke", "sub", "subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row", "table-row-group", "tamil", "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight", "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top", "trad-chinese-formal", "trad-chinese-informal", "translate", "translate3d", "translateX", "translateY", "translateZ", "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal", "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", "var", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "wider", "window", "windowframe", "windowtext", "words", "x-large", "x-small", "xor", "xx-large", "xx-small", "bicubic", "optimizespeed", "grayscale", "row", "row-reverse", "wrap", "wrap-reverse", "column-reverse", "flex-start", "flex-end", "space-between", "space-around", "unset"];
|
|
10
|
+
var wordOperatorKeywords_ = ["in", "and", "or", "not", "is not", "is a", "is", "isnt", "defined", "if unless"], blockKeywords_ = ["for", "if", "else", "unless", "from", "to"], commonAtoms_ = ["null", "true", "false", "href", "title", "type", "not-allowed", "readonly", "disabled"], commonDef_ = ["@font-face", "@keyframes", "@media", "@viewport", "@page", "@host", "@supports", "@block", "@css"];
|
|
11
|
+
var hintWords = tagKeywords_.concat(
|
|
12
|
+
documentTypes_,
|
|
13
|
+
mediaTypes_,
|
|
14
|
+
mediaFeatures_,
|
|
15
|
+
propertyKeywords_,
|
|
16
|
+
nonStandardPropertyKeywords_,
|
|
17
|
+
colorKeywords_,
|
|
18
|
+
valueKeywords_,
|
|
19
|
+
fontProperties_,
|
|
20
|
+
wordOperatorKeywords_,
|
|
21
|
+
blockKeywords_,
|
|
22
|
+
commonAtoms_,
|
|
23
|
+
commonDef_
|
|
24
|
+
);
|
|
25
|
+
function wordRegexp(words) {
|
|
26
|
+
words = words.sort(function(a, b) {
|
|
27
|
+
return b > a;
|
|
28
|
+
});
|
|
29
|
+
return new RegExp("^((" + words.join(")|(") + "))\\b");
|
|
30
|
+
}
|
|
31
|
+
function keySet(array) {
|
|
32
|
+
var keys = {};
|
|
33
|
+
for (var i = 0; i < array.length; ++i) keys[array[i]] = true;
|
|
34
|
+
return keys;
|
|
35
|
+
}
|
|
36
|
+
function escapeRegExp(text) {
|
|
37
|
+
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
38
|
+
}
|
|
39
|
+
var tagKeywords = keySet(tagKeywords_), tagVariablesRegexp = /^(a|b|i|s|col|em)$/i, propertyKeywords = keySet(propertyKeywords_), nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_), valueKeywords = keySet(valueKeywords_), colorKeywords = keySet(colorKeywords_), documentTypes = keySet(documentTypes_), documentTypesRegexp = wordRegexp(documentTypes_), mediaFeatures = keySet(mediaFeatures_), mediaTypes = keySet(mediaTypes_), fontProperties = keySet(fontProperties_), operatorsRegexp = /^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/, wordOperatorKeywordsRegexp = wordRegexp(wordOperatorKeywords_), blockKeywords = keySet(blockKeywords_), vendorPrefixesRegexp = new RegExp(/^\-(moz|ms|o|webkit)-/i), commonAtoms = keySet(commonAtoms_), firstWordMatch = "", states = {}, ch, style, type, override;
|
|
40
|
+
function tokenBase(stream, state) {
|
|
41
|
+
firstWordMatch = stream.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/);
|
|
42
|
+
state.context.line.firstWord = firstWordMatch ? firstWordMatch[0].replace(/^\s*/, "") : "";
|
|
43
|
+
state.context.line.indent = stream.indentation();
|
|
44
|
+
ch = stream.peek();
|
|
45
|
+
if (stream.match("//")) {
|
|
46
|
+
stream.skipToEnd();
|
|
47
|
+
return ["comment", "comment"];
|
|
48
|
+
}
|
|
49
|
+
if (stream.match("/*")) {
|
|
50
|
+
state.tokenize = tokenCComment;
|
|
51
|
+
return tokenCComment(stream, state);
|
|
52
|
+
}
|
|
53
|
+
if (ch == '"' || ch == "'") {
|
|
54
|
+
stream.next();
|
|
55
|
+
state.tokenize = tokenString(ch);
|
|
56
|
+
return state.tokenize(stream, state);
|
|
57
|
+
}
|
|
58
|
+
if (ch == "@") {
|
|
59
|
+
stream.next();
|
|
60
|
+
stream.eatWhile(/[\w\\-]/);
|
|
61
|
+
return ["def", stream.current()];
|
|
62
|
+
}
|
|
63
|
+
if (ch == "#") {
|
|
64
|
+
stream.next();
|
|
65
|
+
if (stream.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i)) {
|
|
66
|
+
return ["atom", "atom"];
|
|
67
|
+
}
|
|
68
|
+
if (stream.match(/^[a-z][\w-]*/i)) {
|
|
69
|
+
return ["builtin", "hash"];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (stream.match(vendorPrefixesRegexp)) {
|
|
73
|
+
return ["meta", "vendor-prefixes"];
|
|
74
|
+
}
|
|
75
|
+
if (stream.match(/^-?[0-9]?\.?[0-9]/)) {
|
|
76
|
+
stream.eatWhile(/[a-z%]/i);
|
|
77
|
+
return ["number", "unit"];
|
|
78
|
+
}
|
|
79
|
+
if (ch == "!") {
|
|
80
|
+
stream.next();
|
|
81
|
+
return [stream.match(/^(important|optional)/i) ? "keyword" : "operator", "important"];
|
|
82
|
+
}
|
|
83
|
+
if (ch == "." && stream.match(/^\.[a-z][\w-]*/i)) {
|
|
84
|
+
return ["qualifier", "qualifier"];
|
|
85
|
+
}
|
|
86
|
+
if (stream.match(documentTypesRegexp)) {
|
|
87
|
+
if (stream.peek() == "(") state.tokenize = tokenParenthesized;
|
|
88
|
+
return ["property", "word"];
|
|
89
|
+
}
|
|
90
|
+
if (stream.match(/^[a-z][\w-]*\(/i)) {
|
|
91
|
+
stream.backUp(1);
|
|
92
|
+
return ["keyword", "mixin"];
|
|
93
|
+
}
|
|
94
|
+
if (stream.match(/^(\+|-)[a-z][\w-]*\(/i)) {
|
|
95
|
+
stream.backUp(1);
|
|
96
|
+
return ["keyword", "block-mixin"];
|
|
97
|
+
}
|
|
98
|
+
if (stream.string.match(/^\s*&/) && stream.match(/^[-_]+[a-z][\w-]*/)) {
|
|
99
|
+
return ["qualifier", "qualifier"];
|
|
100
|
+
}
|
|
101
|
+
if (stream.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)) {
|
|
102
|
+
stream.backUp(1);
|
|
103
|
+
return ["variableName.special", "reference"];
|
|
104
|
+
}
|
|
105
|
+
if (stream.match(/^&{1}\s*$/)) {
|
|
106
|
+
return ["variableName.special", "reference"];
|
|
107
|
+
}
|
|
108
|
+
if (stream.match(wordOperatorKeywordsRegexp)) {
|
|
109
|
+
return ["operator", "operator"];
|
|
110
|
+
}
|
|
111
|
+
if (stream.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)) {
|
|
112
|
+
if (stream.match(/^(\.|\[)[\w-\'\"\]]+/i, false)) {
|
|
113
|
+
if (!wordIsTag(stream.current())) {
|
|
114
|
+
stream.match(".");
|
|
115
|
+
return ["variable", "variable-name"];
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return ["variable", "word"];
|
|
119
|
+
}
|
|
120
|
+
if (stream.match(operatorsRegexp)) {
|
|
121
|
+
return ["operator", stream.current()];
|
|
122
|
+
}
|
|
123
|
+
if (/[:;,{}\[\]\(\)]/.test(ch)) {
|
|
124
|
+
stream.next();
|
|
125
|
+
return [null, ch];
|
|
126
|
+
}
|
|
127
|
+
stream.next();
|
|
128
|
+
return [null, null];
|
|
129
|
+
}
|
|
130
|
+
function tokenCComment(stream, state) {
|
|
131
|
+
var maybeEnd = false, ch2;
|
|
132
|
+
while ((ch2 = stream.next()) != null) {
|
|
133
|
+
if (maybeEnd && ch2 == "/") {
|
|
134
|
+
state.tokenize = null;
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
maybeEnd = ch2 == "*";
|
|
138
|
+
}
|
|
139
|
+
return ["comment", "comment"];
|
|
140
|
+
}
|
|
141
|
+
function tokenString(quote) {
|
|
142
|
+
return function(stream, state) {
|
|
143
|
+
var escaped = false, ch2;
|
|
144
|
+
while ((ch2 = stream.next()) != null) {
|
|
145
|
+
if (ch2 == quote && !escaped) {
|
|
146
|
+
if (quote == ")") stream.backUp(1);
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
escaped = !escaped && ch2 == "\\";
|
|
150
|
+
}
|
|
151
|
+
if (ch2 == quote || !escaped && quote != ")") state.tokenize = null;
|
|
152
|
+
return ["string", "string"];
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
function tokenParenthesized(stream, state) {
|
|
156
|
+
stream.next();
|
|
157
|
+
if (!stream.match(/\s*[\"\')]/, false))
|
|
158
|
+
state.tokenize = tokenString(")");
|
|
159
|
+
else
|
|
160
|
+
state.tokenize = null;
|
|
161
|
+
return [null, "("];
|
|
162
|
+
}
|
|
163
|
+
function Context(type2, indent, prev, line) {
|
|
164
|
+
this.type = type2;
|
|
165
|
+
this.indent = indent;
|
|
166
|
+
this.prev = prev;
|
|
167
|
+
this.line = line || { firstWord: "", indent: 0 };
|
|
168
|
+
}
|
|
169
|
+
function pushContext(state, stream, type2, indent) {
|
|
170
|
+
indent = indent >= 0 ? indent : stream.indentUnit;
|
|
171
|
+
state.context = new Context(type2, stream.indentation() + indent, state.context);
|
|
172
|
+
return type2;
|
|
173
|
+
}
|
|
174
|
+
function popContext(state, stream, currentIndent) {
|
|
175
|
+
var contextIndent = state.context.indent - stream.indentUnit;
|
|
176
|
+
currentIndent = currentIndent || false;
|
|
177
|
+
state.context = state.context.prev;
|
|
178
|
+
if (currentIndent) state.context.indent = contextIndent;
|
|
179
|
+
return state.context.type;
|
|
180
|
+
}
|
|
181
|
+
function pass(type2, stream, state) {
|
|
182
|
+
return states[state.context.type](type2, stream, state);
|
|
183
|
+
}
|
|
184
|
+
function popAndPass(type2, stream, state, n) {
|
|
185
|
+
for (var i = 1; i > 0; i--)
|
|
186
|
+
state.context = state.context.prev;
|
|
187
|
+
return pass(type2, stream, state);
|
|
188
|
+
}
|
|
189
|
+
function wordIsTag(word) {
|
|
190
|
+
return word.toLowerCase() in tagKeywords;
|
|
191
|
+
}
|
|
192
|
+
function wordIsProperty(word) {
|
|
193
|
+
word = word.toLowerCase();
|
|
194
|
+
return word in propertyKeywords || word in fontProperties;
|
|
195
|
+
}
|
|
196
|
+
function wordIsBlock(word) {
|
|
197
|
+
return word.toLowerCase() in blockKeywords;
|
|
198
|
+
}
|
|
199
|
+
function wordIsVendorPrefix(word) {
|
|
200
|
+
return word.toLowerCase().match(vendorPrefixesRegexp);
|
|
201
|
+
}
|
|
202
|
+
function wordAsValue(word) {
|
|
203
|
+
var wordLC = word.toLowerCase();
|
|
204
|
+
var override2 = "variable";
|
|
205
|
+
if (wordIsTag(word)) override2 = "tag";
|
|
206
|
+
else if (wordIsBlock(word)) override2 = "block-keyword";
|
|
207
|
+
else if (wordIsProperty(word)) override2 = "property";
|
|
208
|
+
else if (wordLC in valueKeywords || wordLC in commonAtoms) override2 = "atom";
|
|
209
|
+
else if (wordLC == "return" || wordLC in colorKeywords) override2 = "keyword";
|
|
210
|
+
else if (word.match(/^[A-Z]/)) override2 = "string";
|
|
211
|
+
return override2;
|
|
212
|
+
}
|
|
213
|
+
function typeIsBlock(type2, stream) {
|
|
214
|
+
return endOfLine(stream) && (type2 == "{" || type2 == "]" || type2 == "hash" || type2 == "qualifier") || type2 == "block-mixin";
|
|
215
|
+
}
|
|
216
|
+
function typeIsInterpolation(type2, stream) {
|
|
217
|
+
return type2 == "{" && stream.match(/^\s*\$?[\w-]+/i, false);
|
|
218
|
+
}
|
|
219
|
+
function typeIsPseudo(type2, stream) {
|
|
220
|
+
return type2 == ":" && stream.match(/^[a-z-]+/, false);
|
|
221
|
+
}
|
|
222
|
+
function startOfLine(stream) {
|
|
223
|
+
return stream.sol() || stream.string.match(new RegExp("^\\s*" + escapeRegExp(stream.current())));
|
|
224
|
+
}
|
|
225
|
+
function endOfLine(stream) {
|
|
226
|
+
return stream.eol() || stream.match(/^\s*$/, false);
|
|
227
|
+
}
|
|
228
|
+
function firstWordOfLine(line) {
|
|
229
|
+
var re = /^\s*[-_]*[a-z0-9]+[\w-]*/i;
|
|
230
|
+
var result = typeof line == "string" ? line.match(re) : line.string.match(re);
|
|
231
|
+
return result ? result[0].replace(/^\s*/, "") : "";
|
|
232
|
+
}
|
|
233
|
+
states.block = function(type2, stream, state) {
|
|
234
|
+
if (type2 == "comment" && startOfLine(stream) || type2 == "," && endOfLine(stream) || type2 == "mixin") {
|
|
235
|
+
return pushContext(state, stream, "block", 0);
|
|
236
|
+
}
|
|
237
|
+
if (typeIsInterpolation(type2, stream)) {
|
|
238
|
+
return pushContext(state, stream, "interpolation");
|
|
239
|
+
}
|
|
240
|
+
if (endOfLine(stream) && type2 == "]") {
|
|
241
|
+
if (!/^\s*(\.|#|:|\[|\*|&)/.test(stream.string) && !wordIsTag(firstWordOfLine(stream))) {
|
|
242
|
+
return pushContext(state, stream, "block", 0);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (typeIsBlock(type2, stream)) {
|
|
246
|
+
return pushContext(state, stream, "block");
|
|
247
|
+
}
|
|
248
|
+
if (type2 == "}" && endOfLine(stream)) {
|
|
249
|
+
return pushContext(state, stream, "block", 0);
|
|
250
|
+
}
|
|
251
|
+
if (type2 == "variable-name") {
|
|
252
|
+
if (stream.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/) || wordIsBlock(firstWordOfLine(stream))) {
|
|
253
|
+
return pushContext(state, stream, "variableName");
|
|
254
|
+
} else {
|
|
255
|
+
return pushContext(state, stream, "variableName", 0);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
if (type2 == "=") {
|
|
259
|
+
if (!endOfLine(stream) && !wordIsBlock(firstWordOfLine(stream))) {
|
|
260
|
+
return pushContext(state, stream, "block", 0);
|
|
261
|
+
}
|
|
262
|
+
return pushContext(state, stream, "block");
|
|
263
|
+
}
|
|
264
|
+
if (type2 == "*") {
|
|
265
|
+
if (endOfLine(stream) || stream.match(/\s*(,|\.|#|\[|:|{)/, false)) {
|
|
266
|
+
override = "tag";
|
|
267
|
+
return pushContext(state, stream, "block");
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (typeIsPseudo(type2, stream)) {
|
|
271
|
+
return pushContext(state, stream, "pseudo");
|
|
272
|
+
}
|
|
273
|
+
if (/@(font-face|media|supports|(-moz-)?document)/.test(type2)) {
|
|
274
|
+
return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");
|
|
275
|
+
}
|
|
276
|
+
if (/@(-(moz|ms|o|webkit)-)?keyframes$/.test(type2)) {
|
|
277
|
+
return pushContext(state, stream, "keyframes");
|
|
278
|
+
}
|
|
279
|
+
if (/@extends?/.test(type2)) {
|
|
280
|
+
return pushContext(state, stream, "extend", 0);
|
|
281
|
+
}
|
|
282
|
+
if (type2 && type2.charAt(0) == "@") {
|
|
283
|
+
if (stream.indentation() > 0 && wordIsProperty(stream.current().slice(1))) {
|
|
284
|
+
override = "variable";
|
|
285
|
+
return "block";
|
|
286
|
+
}
|
|
287
|
+
if (/(@import|@require|@charset)/.test(type2)) {
|
|
288
|
+
return pushContext(state, stream, "block", 0);
|
|
289
|
+
}
|
|
290
|
+
return pushContext(state, stream, "block");
|
|
291
|
+
}
|
|
292
|
+
if (type2 == "reference" && endOfLine(stream)) {
|
|
293
|
+
return pushContext(state, stream, "block");
|
|
294
|
+
}
|
|
295
|
+
if (type2 == "(") {
|
|
296
|
+
return pushContext(state, stream, "parens");
|
|
297
|
+
}
|
|
298
|
+
if (type2 == "vendor-prefixes") {
|
|
299
|
+
return pushContext(state, stream, "vendorPrefixes");
|
|
300
|
+
}
|
|
301
|
+
if (type2 == "word") {
|
|
302
|
+
var word = stream.current();
|
|
303
|
+
override = wordAsValue(word);
|
|
304
|
+
if (override == "property") {
|
|
305
|
+
if (startOfLine(stream)) {
|
|
306
|
+
return pushContext(state, stream, "block", 0);
|
|
307
|
+
} else {
|
|
308
|
+
override = "atom";
|
|
309
|
+
return "block";
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
if (override == "tag") {
|
|
313
|
+
if (/embed|menu|pre|progress|sub|table/.test(word)) {
|
|
314
|
+
if (wordIsProperty(firstWordOfLine(stream))) {
|
|
315
|
+
override = "atom";
|
|
316
|
+
return "block";
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
if (stream.string.match(new RegExp("\\[\\s*" + word + "|" + word + "\\s*\\]"))) {
|
|
320
|
+
override = "atom";
|
|
321
|
+
return "block";
|
|
322
|
+
}
|
|
323
|
+
if (tagVariablesRegexp.test(word)) {
|
|
324
|
+
if (startOfLine(stream) && stream.string.match(/=/) || !startOfLine(stream) && !stream.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/) && !wordIsTag(firstWordOfLine(stream))) {
|
|
325
|
+
override = "variable";
|
|
326
|
+
if (wordIsBlock(firstWordOfLine(stream))) return "block";
|
|
327
|
+
return pushContext(state, stream, "block", 0);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (endOfLine(stream)) return pushContext(state, stream, "block");
|
|
331
|
+
}
|
|
332
|
+
if (override == "block-keyword") {
|
|
333
|
+
override = "keyword";
|
|
334
|
+
if (stream.current(/(if|unless)/) && !startOfLine(stream)) {
|
|
335
|
+
return "block";
|
|
336
|
+
}
|
|
337
|
+
return pushContext(state, stream, "block");
|
|
338
|
+
}
|
|
339
|
+
if (word == "return") return pushContext(state, stream, "block", 0);
|
|
340
|
+
if (override == "variable" && stream.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)) {
|
|
341
|
+
return pushContext(state, stream, "block");
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
return state.context.type;
|
|
345
|
+
};
|
|
346
|
+
states.parens = function(type2, stream, state) {
|
|
347
|
+
if (type2 == "(") return pushContext(state, stream, "parens");
|
|
348
|
+
if (type2 == ")") {
|
|
349
|
+
if (state.context.prev.type == "parens") {
|
|
350
|
+
return popContext(state, stream);
|
|
351
|
+
}
|
|
352
|
+
if (stream.string.match(/^[a-z][\w-]*\(/i) && endOfLine(stream) || wordIsBlock(firstWordOfLine(stream)) || /(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(firstWordOfLine(stream)) || !stream.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/) && wordIsTag(firstWordOfLine(stream))) {
|
|
353
|
+
return pushContext(state, stream, "block");
|
|
354
|
+
}
|
|
355
|
+
if (stream.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/) || stream.string.match(/^\s*(\(|\)|[0-9])/) || stream.string.match(/^\s+[a-z][\w-]*\(/i) || stream.string.match(/^\s+[\$-]?[a-z]/i)) {
|
|
356
|
+
return pushContext(state, stream, "block", 0);
|
|
357
|
+
}
|
|
358
|
+
if (endOfLine(stream)) return pushContext(state, stream, "block");
|
|
359
|
+
else return pushContext(state, stream, "block", 0);
|
|
360
|
+
}
|
|
361
|
+
if (type2 && type2.charAt(0) == "@" && wordIsProperty(stream.current().slice(1))) {
|
|
362
|
+
override = "variable";
|
|
363
|
+
}
|
|
364
|
+
if (type2 == "word") {
|
|
365
|
+
var word = stream.current();
|
|
366
|
+
override = wordAsValue(word);
|
|
367
|
+
if (override == "tag" && tagVariablesRegexp.test(word)) {
|
|
368
|
+
override = "variable";
|
|
369
|
+
}
|
|
370
|
+
if (override == "property" || word == "to") override = "atom";
|
|
371
|
+
}
|
|
372
|
+
if (type2 == "variable-name") {
|
|
373
|
+
return pushContext(state, stream, "variableName");
|
|
374
|
+
}
|
|
375
|
+
if (typeIsPseudo(type2, stream)) {
|
|
376
|
+
return pushContext(state, stream, "pseudo");
|
|
377
|
+
}
|
|
378
|
+
return state.context.type;
|
|
379
|
+
};
|
|
380
|
+
states.vendorPrefixes = function(type2, stream, state) {
|
|
381
|
+
if (type2 == "word") {
|
|
382
|
+
override = "property";
|
|
383
|
+
return pushContext(state, stream, "block", 0);
|
|
384
|
+
}
|
|
385
|
+
return popContext(state, stream);
|
|
386
|
+
};
|
|
387
|
+
states.pseudo = function(type2, stream, state) {
|
|
388
|
+
if (!wordIsProperty(firstWordOfLine(stream.string))) {
|
|
389
|
+
stream.match(/^[a-z-]+/);
|
|
390
|
+
override = "variableName.special";
|
|
391
|
+
if (endOfLine(stream)) return pushContext(state, stream, "block");
|
|
392
|
+
return popContext(state, stream);
|
|
393
|
+
}
|
|
394
|
+
return popAndPass(type2, stream, state);
|
|
395
|
+
};
|
|
396
|
+
states.atBlock = function(type2, stream, state) {
|
|
397
|
+
if (type2 == "(") return pushContext(state, stream, "atBlock_parens");
|
|
398
|
+
if (typeIsBlock(type2, stream)) {
|
|
399
|
+
return pushContext(state, stream, "block");
|
|
400
|
+
}
|
|
401
|
+
if (typeIsInterpolation(type2, stream)) {
|
|
402
|
+
return pushContext(state, stream, "interpolation");
|
|
403
|
+
}
|
|
404
|
+
if (type2 == "word") {
|
|
405
|
+
var word = stream.current().toLowerCase();
|
|
406
|
+
if (/^(only|not|and|or)$/.test(word))
|
|
407
|
+
override = "keyword";
|
|
408
|
+
else if (documentTypes.hasOwnProperty(word))
|
|
409
|
+
override = "tag";
|
|
410
|
+
else if (mediaTypes.hasOwnProperty(word))
|
|
411
|
+
override = "attribute";
|
|
412
|
+
else if (mediaFeatures.hasOwnProperty(word))
|
|
413
|
+
override = "property";
|
|
414
|
+
else if (nonStandardPropertyKeywords.hasOwnProperty(word))
|
|
415
|
+
override = "string.special";
|
|
416
|
+
else override = wordAsValue(stream.current());
|
|
417
|
+
if (override == "tag" && endOfLine(stream)) {
|
|
418
|
+
return pushContext(state, stream, "block");
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
if (type2 == "operator" && /^(not|and|or)$/.test(stream.current())) {
|
|
422
|
+
override = "keyword";
|
|
423
|
+
}
|
|
424
|
+
return state.context.type;
|
|
425
|
+
};
|
|
426
|
+
states.atBlock_parens = function(type2, stream, state) {
|
|
427
|
+
if (type2 == "{" || type2 == "}") return state.context.type;
|
|
428
|
+
if (type2 == ")") {
|
|
429
|
+
if (endOfLine(stream)) return pushContext(state, stream, "block");
|
|
430
|
+
else return pushContext(state, stream, "atBlock");
|
|
431
|
+
}
|
|
432
|
+
if (type2 == "word") {
|
|
433
|
+
var word = stream.current().toLowerCase();
|
|
434
|
+
override = wordAsValue(word);
|
|
435
|
+
if (/^(max|min)/.test(word)) override = "property";
|
|
436
|
+
if (override == "tag") {
|
|
437
|
+
tagVariablesRegexp.test(word) ? override = "variable" : override = "atom";
|
|
438
|
+
}
|
|
439
|
+
return state.context.type;
|
|
440
|
+
}
|
|
441
|
+
return states.atBlock(type2, stream, state);
|
|
442
|
+
};
|
|
443
|
+
states.keyframes = function(type2, stream, state) {
|
|
444
|
+
if (stream.indentation() == "0" && (type2 == "}" && startOfLine(stream) || type2 == "]" || type2 == "hash" || type2 == "qualifier" || wordIsTag(stream.current()))) {
|
|
445
|
+
return popAndPass(type2, stream, state);
|
|
446
|
+
}
|
|
447
|
+
if (type2 == "{") return pushContext(state, stream, "keyframes");
|
|
448
|
+
if (type2 == "}") {
|
|
449
|
+
if (startOfLine(stream)) return popContext(state, stream, true);
|
|
450
|
+
else return pushContext(state, stream, "keyframes");
|
|
451
|
+
}
|
|
452
|
+
if (type2 == "unit" && /^[0-9]+\%$/.test(stream.current())) {
|
|
453
|
+
return pushContext(state, stream, "keyframes");
|
|
454
|
+
}
|
|
455
|
+
if (type2 == "word") {
|
|
456
|
+
override = wordAsValue(stream.current());
|
|
457
|
+
if (override == "block-keyword") {
|
|
458
|
+
override = "keyword";
|
|
459
|
+
return pushContext(state, stream, "keyframes");
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
if (/@(font-face|media|supports|(-moz-)?document)/.test(type2)) {
|
|
463
|
+
return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock");
|
|
464
|
+
}
|
|
465
|
+
if (type2 == "mixin") {
|
|
466
|
+
return pushContext(state, stream, "block", 0);
|
|
467
|
+
}
|
|
468
|
+
return state.context.type;
|
|
469
|
+
};
|
|
470
|
+
states.interpolation = function(type2, stream, state) {
|
|
471
|
+
if (type2 == "{") popContext(state, stream) && pushContext(state, stream, "block");
|
|
472
|
+
if (type2 == "}") {
|
|
473
|
+
if (stream.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i) || stream.string.match(/^\s*[a-z]/i) && wordIsTag(firstWordOfLine(stream))) {
|
|
474
|
+
return pushContext(state, stream, "block");
|
|
475
|
+
}
|
|
476
|
+
if (!stream.string.match(/^(\{|\s*\&)/) || stream.match(/\s*[\w-]/, false)) {
|
|
477
|
+
return pushContext(state, stream, "block", 0);
|
|
478
|
+
}
|
|
479
|
+
return pushContext(state, stream, "block");
|
|
480
|
+
}
|
|
481
|
+
if (type2 == "variable-name") {
|
|
482
|
+
return pushContext(state, stream, "variableName", 0);
|
|
483
|
+
}
|
|
484
|
+
if (type2 == "word") {
|
|
485
|
+
override = wordAsValue(stream.current());
|
|
486
|
+
if (override == "tag") override = "atom";
|
|
487
|
+
}
|
|
488
|
+
return state.context.type;
|
|
489
|
+
};
|
|
490
|
+
states.extend = function(type2, stream, state) {
|
|
491
|
+
if (type2 == "[" || type2 == "=") return "extend";
|
|
492
|
+
if (type2 == "]") return popContext(state, stream);
|
|
493
|
+
if (type2 == "word") {
|
|
494
|
+
override = wordAsValue(stream.current());
|
|
495
|
+
return "extend";
|
|
496
|
+
}
|
|
497
|
+
return popContext(state, stream);
|
|
498
|
+
};
|
|
499
|
+
states.variableName = function(type2, stream, state) {
|
|
500
|
+
if (type2 == "string" || type2 == "[" || type2 == "]" || stream.current().match(/^(\.|\$)/)) {
|
|
501
|
+
if (stream.current().match(/^\.[\w-]+/i)) override = "variable";
|
|
502
|
+
return "variableName";
|
|
503
|
+
}
|
|
504
|
+
return popAndPass(type2, stream, state);
|
|
505
|
+
};
|
|
506
|
+
const stylus = {
|
|
507
|
+
name: "stylus",
|
|
508
|
+
startState: function() {
|
|
509
|
+
return {
|
|
510
|
+
tokenize: null,
|
|
511
|
+
state: "block",
|
|
512
|
+
context: new Context("block", 0, null)
|
|
513
|
+
};
|
|
514
|
+
},
|
|
515
|
+
token: function(stream, state) {
|
|
516
|
+
if (!state.tokenize && stream.eatSpace()) return null;
|
|
517
|
+
style = (state.tokenize || tokenBase)(stream, state);
|
|
518
|
+
if (style && typeof style == "object") {
|
|
519
|
+
type = style[1];
|
|
520
|
+
style = style[0];
|
|
521
|
+
}
|
|
522
|
+
override = style;
|
|
523
|
+
state.state = states[state.state](type, stream, state);
|
|
524
|
+
return override;
|
|
525
|
+
},
|
|
526
|
+
indent: function(state, textAfter, iCx) {
|
|
527
|
+
var cx = state.context, ch2 = textAfter && textAfter.charAt(0), indent = cx.indent, lineFirstWord = firstWordOfLine(textAfter), lineIndent = cx.line.indent, prevLineFirstWord = state.context.prev ? state.context.prev.line.firstWord : "", prevLineIndent = state.context.prev ? state.context.prev.line.indent : lineIndent;
|
|
528
|
+
if (cx.prev && (ch2 == "}" && (cx.type == "block" || cx.type == "atBlock" || cx.type == "keyframes") || ch2 == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") || ch2 == "{" && cx.type == "at")) {
|
|
529
|
+
indent = cx.indent - iCx.unit;
|
|
530
|
+
} else if (!/(\})/.test(ch2)) {
|
|
531
|
+
if (/@|\$|\d/.test(ch2) || /^\{/.test(textAfter) || /^\s*\/(\/|\*)/.test(textAfter) || /^\s*\/\*/.test(prevLineFirstWord) || /^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(textAfter) || /^(\+|-)?[a-z][\w-]*\(/i.test(textAfter) || /^return/.test(textAfter) || wordIsBlock(lineFirstWord)) {
|
|
532
|
+
indent = lineIndent;
|
|
533
|
+
} else if (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(ch2) || wordIsTag(lineFirstWord)) {
|
|
534
|
+
if (/\,\s*$/.test(prevLineFirstWord)) {
|
|
535
|
+
indent = prevLineIndent;
|
|
536
|
+
} else if (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(prevLineFirstWord) || wordIsTag(prevLineFirstWord)) {
|
|
537
|
+
indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + iCx.unit;
|
|
538
|
+
} else {
|
|
539
|
+
indent = lineIndent;
|
|
540
|
+
}
|
|
541
|
+
} else if (!/,\s*$/.test(textAfter) && (wordIsVendorPrefix(lineFirstWord) || wordIsProperty(lineFirstWord))) {
|
|
542
|
+
if (wordIsBlock(prevLineFirstWord)) {
|
|
543
|
+
indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + iCx.unit;
|
|
544
|
+
} else if (/^\{/.test(prevLineFirstWord)) {
|
|
545
|
+
indent = lineIndent <= prevLineIndent ? lineIndent : prevLineIndent + iCx.unit;
|
|
546
|
+
} else if (wordIsVendorPrefix(prevLineFirstWord) || wordIsProperty(prevLineFirstWord)) {
|
|
547
|
+
indent = lineIndent >= prevLineIndent ? prevLineIndent : lineIndent;
|
|
548
|
+
} else if (/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(prevLineFirstWord) || /=\s*$/.test(prevLineFirstWord) || wordIsTag(prevLineFirstWord) || /^\$[\w-\.\[\]\'\"]/.test(prevLineFirstWord)) {
|
|
549
|
+
indent = prevLineIndent + iCx.unit;
|
|
550
|
+
} else {
|
|
551
|
+
indent = lineIndent;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
return indent;
|
|
556
|
+
},
|
|
557
|
+
languageData: {
|
|
558
|
+
indentOnInput: /^\s*\}$/,
|
|
559
|
+
commentTokens: { line: "//", block: { open: "/*", close: "*/" } },
|
|
560
|
+
autocomplete: hintWords
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
export {
|
|
564
|
+
stylus
|
|
565
|
+
};
|
|
566
|
+
//# sourceMappingURL=stylus-BkS-boTH.js.map
|