var e,t={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},n={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},r=/[+\-*&^%:=<>!|\/]/;function i(o,u){var c,l=o.next();if('"'==l||"'"==l||"`"==l)return u.tokenize=(c=l,function(e,t){for(var n,r=!1,a=!1;null!=(n=e.next());){if(n==c&&!r){a=!0;break}r=!r&&"`"!=c&&"\\"==n}return(a||!r&&"`"!=c)&&(t.tokenize=i),"string"}),u.tokenize(o,u);if(/[\d\.]/.test(l))return"."==l?o.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==l?o.match(/^[xX][0-9a-fA-F]+/)||o.match(/^0[0-7]+/):o.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(l))return e=l,null;if("/"==l){if(o.eat("*"))return u.tokenize=a,a(o,u);if(o.eat("/"))return o.skipToEnd(),"comment"}if(r.test(l))return o.eatWhile(r),"operator";o.eatWhile(/[\w\$_\xa1-\uffff]/);var f=o.current();return t.propertyIsEnumerable(f)?("case"!=f&&"default"!=f||(e="case"),"keyword"):n.propertyIsEnumerable(f)?"atom":"variable"}function a(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=i;break}r="*"==n}return"comment"}function o(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function u(e,t,n){return e.context=new o(e.indented,t,n,null,e.context)}function c(e){if(e.context.prev){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}}var l={startState:function(e){return{tokenize:null,context:new o(-e,0,"top",!1),indented:0,startOfLine:!0}},token:function(t,n){var r=n.context;if(t.sol()&&(null==r.align&&(r.align=!1),n.indented=t.indentation(),n.startOfLine=!0,"case"==r.type&&(r.type="}")),t.eatSpace())return null;e=null;var a=(n.tokenize||i)(t,n);return"comment"==a||(null==r.align&&(r.align=!0),"{"==e?u(n,t.column(),"}"):"["==e?u(n,t.column(),"]"):"("==e?u(n,t.column(),")"):"case"==e?r.type="case":("}"==e&&"}"==r.type||e==r.type)&&c(n),n.startOfLine=!1),a},indent:function(e,t,n){if(e.tokenize!=i&&null!=e.tokenize)return null;var r=e.context,a=t&&t.charAt(0);if("case"==r.type&&/^(?:case|default)\b/.test(t))return e.context.type="}",r.indented;var o=a==r.type;return r.align?r.column+(o?0:1):r.indented+(o?0:n.unit)},languageData:{indentOnInput:/^\s([{}]|case |default\s*:)$/,commentTokens:{line:"//",block:{open:"/*",close:"*/"}}}};export{l as go};