1(function(a){if(typeof exports=="object"&&typeof module=="object")a(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],a);else a(CodeMirror)})(function(a){"use strict";a.defineMode("go",function(b){var c=b.indentUnit;var d={"break":true,"case":true,chan:true,"const":true,"continue":true,"default":true,defer:true,"else":true,fallthrough:true,"for":true,func:true,go:true,"goto":true,"if":true,"import":true,"interface":true,map:true,"package":true,range:true,"return":true,select:true,struct:true,"switch":true,type:true,"var":true,bool:true,"byte":true,complex64:true,complex128:true,float32:true,float64:true,int8:true,int16:true,int32:true,int64:true,string:true,uint8:true,uint16:true,uint32:true,uint64:true,"int":true,uint:true,uintptr:true,error:true,rune:true};var e={"true":true,"false":true,iota:true,nil:true,append:true,cap:true,close:true,complex:true,copy:true,"delete":true,imag:true,len:true,make:true,"new":true,panic:true,print:true,println:true,real:true,recover:true};var f=/[+\-*&^%:=<>!|\/]/;var g;function h(a,b){var c=a.next();if(c=='"'||c=="'"||c=="`"){b.tokenize=i(c);return b.tokenize(a,b)}if(/[\d\.]/.test(c)){if(c=="."){a.match(/^[0-9]+([eE][\-+]?[0-9]+)?/)}else if(c=="0"){a.match(/^[xX][0-9a-fA-F]+/)||a.match(/^0[0-7]+/)}else{a.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/)}return"number"}if(/[\[\]{}\(\),;\:\.]/.test(c)){g=c;return null}if(c=="/"){if(a.eat("*")){b.tokenize=j;return j(a,b)}if(a.eat("/")){a.skipToEnd();return"comment"}}if(f.test(c)){a.eatWhile(f);return"operator"}a.eatWhile(/[\w\$_\xa1-\uffff]/);var h=a.current();if(d.propertyIsEnumerable(h)){if(h=="case"||h=="default")g="case";return"keyword"}if(e.propertyIsEnumerable(h))return"atom";return"variable"}function i(a){return function(b,c){var d=false,e,f=false;while((e=b.next())!=null){if(e==a&&!d){f=true;break}d=!d&&a!="`"&&e=="\\"}if(f||!(d||a=="`"))c.tokenize=h;return"string"}}function j(a,b){var c=false,d;while(d=a.next()){if(d=="/"&&c){b.tokenize=h;break}c=d=="*"}return"comment"}function k(a,b,c,d,e){this.indented=a;this.column=b;this.type=c;this.align=d;this.prev=e}function l(a,b,c){return a.context=new k(a.indented,b,c,null,a.context)}function m(a){if(!a.context.prev)return;var b=a.context.type;if(b==")"||b=="]"||b=="}")a.indented=a.context.indented;return a.context=a.context.prev}return{startState:function(a){return{tokenize:null,context:new k((a||0)-c,0,"top",false),indented:0,startOfLine:true}},token:function(a,b){var c=b.context;if(a.sol()){if(c.align==null)c.align=false;b.indented=a.indentation();b.startOfLine=true;if(c.type=="case")c.type="}"}if(a.eatSpace())return null;g=null;var d=(b.tokenize||h)(a,b);if(d=="comment")return d;if(c.align==null)c.align=true;if(g=="{")l(b,a.column(),"}");else if(g=="[")l(b,a.column(),"]");else if(g=="(")l(b,a.column(),")");else if(g=="case")c.type="case";else if(g=="}"&&c.type=="}")m(b);else if(g==c.type)m(b);b.startOfLine=false;return d},indent:function(b,d){if(b.tokenize!=h&&b.tokenize!=null)return a.Pass;var e=b.context,f=d&&d.charAt(0);if(e.type=="case"&&/^(?:case|default)\b/.test(d)){b.context.type="}";return e.indented}var g=f==e.type;if(e.align)return e.column+(g?0:1);else return e.indented+(g?0:c)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}});a.defineMIME("text/x-go","go")}); 2//# sourceMappingURL=go.min.js.map