'use strict';(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){function d(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function l(a,b){if(a.eatSpace())return null;if(b.inComment){if(a.match(m))return b.inComment=!1,"comment";a.skipToEnd();return"comment"}if(a.match("//"))return a.skipToEnd(),"comment";if(a.match(n))return"comment";if(a.match(p))return b.inComment=
!0,"comment";if(a.match(/^-?[0-9\.]/,!1)&&(a.match(q)||a.match(r)))return"number";if(a.match(t))return"string";if(b.startDef&&a.match(e))return"def";if(b.endDef&&a.match(u))return b.endDef=!1,"def";if(a.match(v))return"keyword";if(a.match(w))return b=b.lastToken,a=(a.match(/^\s*(.+?)\b/,!1)||[])[1],":"===b||"implements"===b||"implements"===a||"="===a?"builtin":"variable-3";if(a.match(x))return"builtin";if(a.match(y))return"atom";if(a.match(e))return"variable";if(a.match(z))return"operator";a.next();
return null}var f="Clamp Constructor EnforceRange Exposed ImplicitThis Global PrimaryGlobal LegacyArrayClass LegacyUnenumerableNamedProperties LenientThis NamedConstructor NewObject NoInterfaceObject OverrideBuiltins PutForwards Replaceable SameObject TreatNonObjectAsNull TreatNullAs EmptyString Unforgeable Unscopeable".split(" "),x=d(f),g="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".split(" "),
w=d(g),h="attribute callback const deleter dictionary enum getter implements inherit interface iterable legacycaller maplike partial required serializer setlike setter static stringifier typedef optional readonly or".split(" "),v=d(h),k=["true","false","Infinity","NaN","null"],y=d(k);c.registerHelper("hintWords","webidl",f.concat(g).concat(h).concat(k));var A=d(["callback","dictionary","enum","interface"]),B=d(["typedef"]),z=/^[:<=>?]/,q=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,r=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,
e=/^_?[A-Za-z][0-9A-Z_a-z-]*/,u=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,t=/^"[^"]*"/,n=/^\/\*.*?\*\//,p=/^\/\*.*/,m=/^.*?\*\//;c.defineMode("webidl",function(){return{startState:function(){return{inComment:!1,lastToken:"",startDef:!1,endDef:!1}},token:function(a,b){var c=l(a,b);c&&(a=a.current(),b.lastToken=a,"keyword"===c?(b.startDef=A.test(a),b.endDef=b.endDef||B.test(a)):b.startDef=!1);return c}}});c.defineMIME("text/x-webidl","webidl")});
