function e(e){for(var t={},n=e.split(` `),r=0;r<n.length;++r)t[n[r]]=!0;return t}var t=e(`Tcl safe after append array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd close concat continue dde eof encoding error eval exec exit expr fblocked fconfigure fcopy file fileevent filename filename flush for foreach format gets glob global history http if incr info interp join lappend lindex linsert list llength load lrange lreplace lsearch lset lsort memory msgcat namespace open package parray pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp registry regsub rename resource return scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest tclvars tell time trace unknown unset update uplevel upvar variable vwait`),n=e(`if elseif else and not or eq ne in ni for foreach while switch`),r=/[+\-*&%=<>!?^\/\|]/;function i(e,t,n){return t.tokenize=n,n(e,t)}function a(e,a){var l=a.beforeParams;a.beforeParams=!1;var u=e.next();if((u==`"`||u==`'`)&&a.inParams)return i(e,a,o(u));if(/[\[\]{}\(\),;\.]/.test(u))return u==`(`&&l?a.inParams=!0:u==`)`&&(a.inParams=!1),null;if(/\d/.test(u))return e.eatWhile(/[\w\.]/),`number`;if(u==`#`)return e.eat(`*`)?i(e,a,s):u==`#`&&e.match(/ *\[ *\[/)?i(e,a,c):(e.skipToEnd(),`comment`);if(u==`"`)return e.skipTo(/"/),`comment`;if(u==`$`)return e.eatWhile(/[$_a-z0-9A-Z\.{:]/),e.eatWhile(/}/),a.beforeParams=!0,`builtin`;if(r.test(u))return e.eatWhile(r),`comment`;e.eatWhile(/[\w\$_{}\xa1-\uffff]/);var d=e.current().toLowerCase();return t&&t.propertyIsEnumerable(d)?`keyword`:n&&n.propertyIsEnumerable(d)?(a.beforeParams=!0,`keyword`):null}function o(e){return function(t,n){for(var r=!1,i,o=!1;(i=t.next())!=null;){if(i==e&&!r){o=!0;break}r=!r&&i==`\\`}return o&&(n.tokenize=a),`string`}}function s(e,t){for(var n=!1,r;r=e.next();){if(r==`#`&&n){t.tokenize=a;break}n=r==`*`}return`comment`}function c(e,t){for(var n=0,r;r=e.next();){if(r==`#`&&n==2){t.tokenize=a;break}r==`]`?n++:r!=` `&&(n=0)}return`meta`}var l={name:`tcl`,startState:function(){return{tokenize:a,beforeParams:!1,inParams:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},languageData:{commentTokens:{line:`#`}}};export{l as tcl};
//# sourceMappingURL=tcl.C0EhDhx-.js.map