7 lines
772 KiB
JavaScript
7 lines
772 KiB
JavaScript
|
/*!-----------------------------------------------------------------------------
|
||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||
|
* monaco-css version: 3.3.0(ed57760e69ec24098de2b4e49fa5be7f48be019a)
|
||
|
* Released under the MIT license
|
||
|
* https://github.com/Microsoft/monaco-css/blob/master/LICENSE.md
|
||
|
*-----------------------------------------------------------------------------*/
|
||
|
!function(e){if("object"==typeof module&&"object"==typeof module.exports){var t=e(require,exports);void 0!==t&&(module.exports=t)}else"function"==typeof define&&define.amd&&define("vscode-css-languageservice/parser/cssScanner",["require","exports"],e)}((function(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Scanner=t.MultiLineStream=t.TokenType=void 0,function(e){e[e.Ident=0]="Ident",e[e.AtKeyword=1]="AtKeyword",e[e.String=2]="String",e[e.BadString=3]="BadString",e[e.UnquotedString=4]="UnquotedString",e[e.Hash=5]="Hash",e[e.Num=6]="Num",e[e.Percentage=7]="Percentage",e[e.Dimension=8]="Dimension",e[e.UnicodeRange=9]="UnicodeRange",e[e.CDO=10]="CDO",e[e.CDC=11]="CDC",e[e.Colon=12]="Colon",e[e.SemiColon=13]="SemiColon",e[e.CurlyL=14]="CurlyL",e[e.CurlyR=15]="CurlyR",e[e.ParenthesisL=16]="ParenthesisL",e[e.ParenthesisR=17]="ParenthesisR",e[e.BracketL=18]="BracketL",e[e.BracketR=19]="BracketR",e[e.Whitespace=20]="Whitespace",e[e.Includes=21]="Includes",e[e.Dashmatch=22]="Dashmatch",e[e.SubstringOperator=23]="SubstringOperator",e[e.PrefixOperator=24]="PrefixOperator",e[e.SuffixOperator=25]="SuffixOperator",e[e.Delim=26]="Delim",e[e.EMS=27]="EMS",e[e.EXS=28]="EXS",e[e.Length=29]="Length",e[e.Angle=30]="Angle",e[e.Time=31]="Time",e[e.Freq=32]="Freq",e[e.Exclamation=33]="Exclamation",e[e.Resolution=34]="Resolution",e[e.Comma=35]="Comma",e[e.Charset=36]="Charset",e[e.EscapedJavaScript=37]="EscapedJavaScript",e[e.BadEscapedJavaScript=38]="BadEscapedJavaScript",e[e.Comment=39]="Comment",e[e.SingleLineComment=40]="SingleLineComment",e[e.EOF=41]="EOF",e[e.CustomToken=42]="CustomToken"}(n=t.TokenType||(t.TokenType={}));var r=function(){function e(e){this.source=e,this.len=e.length,this.position=0}return e.prototype.substring=function(e,t){return void 0===t&&(t=this.position),this.source.substring(e,t)},e.prototype.eos=function(){return this.len<=this.position},e.prototype.pos=function(){return this.position},e.prototype.goBackTo=function(e){this.position=e},e.prototype.goBack=function(e){this.position-=e},e.prototype.advance=function(e){this.position+=e},e.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position+e)||0},e.prototype.lookbackChar=function(e){return void 0===e&&(e=0),this.source.charCodeAt(this.position-e)||0},e.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)&&(this.position++,!0)},e.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0},e.prototype.advanceWhileChar=function(e){for(var t=this.position;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t},e}();t.MultiLineStream=r;var i="a".charCodeAt(0),o="f".charCodeAt(0),s="z".charCodeAt(0),a="A".charCodeAt(0),l="F".charCodeAt(0),c="Z".charCodeAt(0),d="0".charCodeAt(0),p="9".charCodeAt(0),h="~".charCodeAt(0),u="^".charCodeAt(0),m="=".charCodeAt(0),f="|".charCodeAt(0),g="-".charCodeAt(0),b="_".charCodeAt(0),y="%".charCodeAt(0),v="*".charCodeAt(0),w="(".charCodeAt(0),x=")".charCodeAt(0),S="<".charCodeAt(0),k=">".charCodeAt(0),C="@".charCodeAt(0),T="#".charCodeAt(0),E="$".charCodeAt(0),F="\\".charCodeAt(0),D="/".charCodeAt(0),_="\n".charCodeAt(0),R="\r".charCodeAt(0),P="\f".charCodeAt(0),z='"'.charCodeAt(0),I="'".charCodeAt(0),N=" ".charCodeAt(0),M="\t".charCodeAt(0),A=";".charCodeAt(0),O=":".charCodeAt(0),W="{".charCodeAt(0),L="}".charCodeAt(0),j="[".charCodeAt(0),U="]".charCodeAt(0),V=",".charCodeAt(0),K=".".charCodeAt(0),q="!".charCodeAt(0),B={};B[A]=n.SemiColon,B[O]=n.Colon,B[W]=n.CurlyL,B[L]=n.CurlyR,B[U]=n.BracketR,B[j]=n.BracketL,B[w]=n.ParenthesisL,B[x]=n.ParenthesisR,B[V]=n.Comma;var $={};$.em=n.EMS,$.ex=n.EXS,$.px=n.Length,$.cm=n.Length,$.mm=n.Length,$.in=n.Length,$.pt=n.Length,$.pc=n.Length,$.deg=n.Angle,$.rad=n.Angle,$.grad=n.Angle,$.ms=n.Time,$.s=n.Time,$.hz=n.Freq,$.khz=n.Freq,$["%
|