eio := block( evaluate := block(src, Object clone doString(src)) escape := block(str, str replaceSeq("\\", "\\\\") replaceSeq("\"", "\\\"") ) src := call evalArgAt(0) clone args := List clone count := 1 while(call message argAt(count) != nil, args push(call message argAt(count) asString) args push(", ") count = count + 1 ) rs := List clone rs push("block(") rs push(args join("")) rs push("\n") rs push("eioOutputBuffer := List clone\n") while (src findSeq("<%", 0), rs push("eioOutputBuffer push(\"") rs push(escape(src beforeSeq("<%"))) src = src afterSeq("<%") rs push("\")\n") if(src slice(0, 1) == "=") then ( rs push("eioOutputBuffer push(") rs push(src between("=", "%>")) rs push(" asString)\n") ) else ( rs push(src beforeSeq("%>")) rs push("\n") ) src = src afterSeq("%>") ) rs push("eioOutputBuffer push(\"") rs push(escape(src)) rs push("\")\n") rs push("eioOutputBuffer join(\"\"))\n") code := rs join("") evaluate(code) )