function words(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}var keywords=words("absolute and array asm begin case const constructor destructor div do downto else end file for function goto if implementation in inherited inline interface label mod nil not object of operator or packed procedure program record reintroduce repeat self set shl shr string then to type unit until uses var while with xor as class dispinterface except exports finalization finally initialization inline is library on out packed property raise resourcestring threadvar try absolute abstract alias assembler bitpacked break cdecl continue cppdecl cvar default deprecated dynamic enumerator experimental export external far far16 forward generic helper implements index interrupt iocheck local message name near nodefault noreturn nostackframe oldfpccall otherwise overload override pascal platform private protected public published read register reintroduce result safecall saveregisters softfloat specialize static stdcall stored strict unaligned unimplemented varargs virtual write"),atoms={null:!0},isOperatorChar=/[+\-*&%=<>!?|\/]/;function tokenBase(e,t){var r=e.next();if("#"==r&&t.startOfLine)return e.skipToEnd(),"meta";if('"'==r||"'"==r)return t.tokenize=tokenString(r),t.tokenize(e,t);if("("==r&&e.eat("*"))return t.tokenize=tokenComment,tokenComment(e,t);if("{"==r)return t.tokenize=tokenCommentBraces,tokenCommentBraces(e,t);if(/[\[\]\(\),;\:\.]/.test(r))return null;if(/\d/.test(r))return e.eatWhile(/[\w\.]/),"number";if("/"==r&&e.eat("/"))return e.skipToEnd(),"comment";if(isOperatorChar.test(r))return e.eatWhile(isOperatorChar),"operator";e.eatWhile(/[\w\$_]/);var n=e.current();return keywords.propertyIsEnumerable(n)?"keyword":atoms.propertyIsEnumerable(n)?"atom":"variable"}function tokenString(e){return function(t,r){for(var n,o=!1,a=!1;null!=(n=t.next());){if(n==e&&!o){a=!0;break}o=!o&&"\\"==n;}return !a&&o||(r.tokenize=null),"string"}}function tokenComment(e,t){for(var r,n=!1;r=e.next();){if(")"==r&&n){t.tokenize=null;break}n="*"==r;}return "comment"}function tokenCommentBraces(e,t){for(var r;r=e.next();)if("}"==r){t.tokenize=null;break}return "comment"}const pascal={startState:function(){return {tokenize:null}},token:function(e,t){if(e.eatSpace())return null;var r=(t.tokenize||tokenBase)(e,t);return r},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{block:{open:"(*",close:"*)"}}}};

export { pascal };
