2 lines
2.6 KiB
JavaScript
2 lines
2.6 KiB
JavaScript
(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[39109],{39109:function(T,i,l){"use strict";l.r(i),l.d(i,{webIDL:function(){return O}});function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var o=["Clamp","Constructor","EnforceRange","Exposed","ImplicitThis","Global","PrimaryGlobal","LegacyArrayClass","LegacyUnenumerableNamedProperties","LenientThis","NamedConstructor","NewObject","NoInterfaceObject","OverrideBuiltins","PutForwards","Replaceable","SameObject","TreatNonObjectAsNull","TreatNullAs","EmptyString","Unforgeable","Unscopeable"],s=n(o),c=["unsigned","short","long","unrestricted","float","double","boolean","byte","octet","Promise","ArrayBuffer","DataView","Int8Array","Int16Array","Int32Array","Uint8Array","Uint16Array","Uint32Array","Uint8ClampedArray","Float32Array","Float64Array","ByteString","DOMString","USVString","sequence","object","RegExp","Error","DOMException","FrozenArray","any","void"],d=n(c),f=["attribute","callback","const","deleter","dictionary","enum","getter","implements","inherit","interface","iterable","legacycaller","maplike","partial","required","serializer","setlike","setter","static","stringifier","typedef","optional","readonly","or"],y=n(f),u=["true","false","Infinity","NaN","null"],p=n(u),b=["callback","dictionary","enum","interface"],v=n(b),A=["typedef"],g=n(A),h=/^[:<=>?]/,D=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,k=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,m=/^_?[A-Za-z][0-9A-Z_a-z-]*/,w=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,C=/^"[^"]*"/,E=/^\/\*.*?\*\//,N=/^\/\*.*/,S=/^.*?\*\//;function I(e,r){if(e.eatSpace())return null;if(r.inComment)return e.match(S)?(r.inComment=!1,"comment"):(e.skipToEnd(),"comment");if(e.match("//"))return e.skipToEnd(),"comment";if(e.match(E))return"comment";if(e.match(N))return r.inComment=!0,"comment";if(e.match(/^-?[0-9\.]/,!1)&&(e.match(D)||e.match(k)))return"number";if(e.match(C))return"string";if(r.startDef&&e.match(m))return"def";if(r.endDef&&e.match(w))return r.endDef=!1,"def";if(e.match(y))return"keyword";if(e.match(d)){var t=r.lastToken,a=(e.match(/^\s*(.+?)\b/,!1)||[])[1];return t===":"||t==="implements"||a==="implements"||a==="="?"builtin":"type"}return e.match(s)?"builtin":e.match(p)?"atom":e.match(m)?"variable":e.match(h)?"operator":(e.next(),null)}const O={name:"webidl",startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(e,r){var t=I(e,r);if(t){var a=e.current();r.lastToken=a,t==="keyword"?(r.startDef=v.test(a),r.endDef=r.endDef||g.test(a)):r.startDef=!1}return t},languageData:{autocomplete:o.concat(c).concat(f).concat(u)}}}}]);
|