var e=`error`;function t(e){return RegExp(`^((`+e.join(`)|(`)+`))\\b`,`i`)}var n=RegExp(`^[\\+\\-\\*/%&\\\\|\\^~<>!]`),r=RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),i=RegExp(`^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))`),a=RegExp(`^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))`),o=RegExp(`^((//=)|(>>=)|(<<=)|(\\*\\*=))`),s=RegExp(`^[_A-Za-z][_A-Za-z0-9]*`),c=[`class`,`module`,`sub`,`enum`,`select`,`while`,`if`,`function`,`get`,`set`,`property`,`try`,`structure`,`synclock`,`using`,`with`],l=[`else`,`elseif`,`case`,`catch`,`finally`],u=[`next`,`loop`],d=[`and`,`andalso`,`or`,`orelse`,`xor`,`in`,`not`,`is`,`isnot`,`like`],f=t(d),p=`#const.#else.#elseif.#end.#if.#region.addhandler.addressof.alias.as.byref.byval.cbool.cbyte.cchar.cdate.cdbl.cdec.cint.clng.cobj.compare.const.continue.csbyte.cshort.csng.cstr.cuint.culng.cushort.declare.default.delegate.dim.directcast.each.erase.error.event.exit.explicit.false.for.friend.gettype.goto.handles.implements.imports.infer.inherits.interface.isfalse.istrue.lib.me.mod.mustinherit.mustoverride.my.mybase.myclass.namespace.narrowing.new.nothing.notinheritable.notoverridable.of.off.on.operator.option.optional.out.overloads.overridable.overrides.paramarray.partial.private.protected.public.raiseevent.readonly.redim.removehandler.resume.return.shadows.shared.static.step.stop.strict.then.throw.to.true.trycast.typeof.until.until.when.widening.withevents.writeonly`.split(`.`),m=`object.boolean.char.string.byte.sbyte.short.ushort.int16.uint16.integer.uinteger.int32.uint32.long.ulong.int64.uint64.decimal.single.double.float.date.datetime.intptr.uintptr`.split(`.`),h=t(p),g=t(m),_=`"`,v=t(c),y=t(l),b=t(u),x=t([`end`]),S=t([`do`]),C=null;function w(e,t){t.currentIndent++}function T(e,t){t.currentIndent--}function E(t,c){if(t.eatSpace())return null;if(t.peek()===`'`)return t.skipToEnd(),`comment`;if(t.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var l=!1;if((t.match(/^\d*\.\d+F?/i)||t.match(/^\d+\.\d*F?/)||t.match(/^\.\d+F?/))&&(l=!0),l)return t.eat(/J/i),`number`;var u=!1;if(t.match(/^&H[0-9a-f]+/i)||t.match(/^&O[0-7]+/i)?u=!0:t.match(/^[1-9]\d*F?/)?(t.eat(/J/i),u=!0):t.match(/^0(?![\dx])/i)&&(u=!0),u)return t.eat(/L/i),`number`}return t.match(_)?(c.tokenize=D(t.current()),c.tokenize(t,c)):t.match(o)||t.match(a)?null:t.match(i)||t.match(n)||t.match(f)?`operator`:t.match(r)?null:t.match(S)?(w(t,c),c.doInCurrentLine=!0,`keyword`):t.match(v)?(c.doInCurrentLine?c.doInCurrentLine=!1:w(t,c),`keyword`):t.match(y)?`keyword`:t.match(x)?(T(t,c),T(t,c),`keyword`):t.match(b)?(T(t,c),`keyword`):t.match(g)||t.match(h)?`keyword`:t.match(s)?`variable`:(t.next(),e)}function D(e){var t=e.length==1,n=`string`;return function(r,i){for(;!r.eol();){if(r.eatWhile(/[^'"]/),r.match(e))return i.tokenize=E,n;r.eat(/['"]/)}return t&&(i.tokenize=E),n}}function O(t,n){var r=n.tokenize(t,n),i=t.current();if(i===`.`)return r=n.tokenize(t,n),r===`variable`?`variable`:e;var a=`[({`.indexOf(i);return a!==-1&&w(t,n),C===`dedent`&&T(t,n)||(a=`])}`.indexOf(i),a!==-1&&T(t,n))?e:r}var k={name:`vb`,startState:function(){return{tokenize:E,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,t){e.sol()&&(t.currentIndent+=t.nextLineIndent,t.nextLineIndent=0,t.doInCurrentLine=0);var n=O(e,t);return t.lastToken={style:n,content:e.current()},n},indent:function(e,t,n){var r=t.replace(/^\s+|\s+$/g,``);return r.match(b)||r.match(x)||r.match(y)?n.unit*(e.currentIndent-1):e.currentIndent<0?0:e.currentIndent*n.unit},languageData:{closeBrackets:{brackets:[`(`,`[`,`{`,`"`]},commentTokens:{line:`'`},autocomplete:c.concat(l).concat(u).concat(d).concat(p).concat(m)}};export{k as vb};
//# sourceMappingURL=vb.CvbtHjcs.js.map