!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../../addon/mode/overlay")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../../addon/mode/overlay"],e):e(CodeMirror)}(function(o){"use strict";o.defineMode("tornado:inner",function(){var o=["and","as","assert","autoescape","block","break","class","comment","context","continue","datetime","def","del","elif","else","end","escape","except","exec","extends","false","finally","for","from","global","if","import","in","include","is","json_encode","lambda","length","linkify","load","module","none","not","or","pass","print","put","raise","raw","return","self","set","squeeze","super","true","try","url_escape","while","with","without","xhtml_escape","yield"];function r(e,t){e.eatWhile(/[^\{]/);var n=e.next();if("{"==n&&(n=e.eat(/\{|%|#/)))return t.tokenize=function(n){"{"==n&&(n="}");return function(e,t){return e.next()==n&&e.eat("}")?(t.tokenize=r,"tag"):e.match(o)?"keyword":"#"==n?"comment":"string"}}(n),"tag"}return o=new RegExp("^(("+o.join(")|(")+"))\\b"),{startState:function(){return{tokenize:r}},token:function(e,t){return t.tokenize(e,t)}}}),o.defineMode("tornado",function(e){var t=o.getMode(e,"text/html"),n=o.getMode(e,"tornado:inner");return o.overlayMode(t,n)}),o.defineMIME("text/x-tornado","tornado")});