mediawiki-extensions-CodeEd.../modules/ace/snippets/gobstones.js

16 lines
40 KiB
JavaScript
Raw Normal View History

ace.define("ace/snippets/gobstones.snippets",["require","exports","module"], function(require, exports, module){module.exports = "# scope: gobstones\n\n# program\nsnippet program\n\tprogram {\n\t\t${1:// cuerpo...}\n\t}\n\n# interactive program\nsnippet interactive program\n\tinteractive program {\n\t\t${1:INIT} -> { ${2:// cuerpo...} }\n\t\t${3:TIMEOUT(${4:5000}) -> { ${5:// cuerpo...} }\n\t\t${6:K_ENTER} -> { ${7:// cuerpo...} }\n\t\t_ -> {}\n\t}\n\n# procedure\nsnippet procedure\n\tprocedure ${1:Nombre}(${2:parametros}) {\n\t\t${3:// cuerpo...}\n\t}\n\n# function\nsnippet function\n\tfunction ${1:nombre}(${2:parametros}) {\n\t\treturn (${3:expresi\u00F3n..})\n\t}\n\n# return\nsnippet return\n\treturn (${1:expresi\u00F3n...})\n\n# type\nsnippet type\n\ttype ${1:Nombre}\n\n# is variant\nsnippet is variant\n\tis variant {\n\t\tcase ${1:NombreDelValor1} {}\n\t\tcase ${2:NombreDelValor2} {}\n\t\tcase ${3:NombreDelValor3} {}\n\t\tcase ${4:NombreDelValor4} {}\n\t}\n\n# is record\nsnippet is record\n\tis record {\n\t\tfield ${1:campo1} // ${2:Tipo}\n\t\tfield ${3:campo2} // ${4:Tipo}\n\t\tfield ${5:campo3} // ${6:Tipo}\n\t\tfield ${7:campo4} // ${8:Tipo}\n\t}\n\n# type _ is variant\nsnippet type _ is variant\n\ttype ${1:Nombre} is variant {\n\t\tcase ${2:NombreDelValor1} {}\n\t\tcase ${3:NombreDelValor2} {}\n\t\tcase ${4:NombreDelValor3} {}\n\t\tcase ${5:NombreDelValor4} {}\n\t}\n\n# type _ is record\nsnippet type _ is record\n\ttype ${1:Nombre} is record {\n\t\tfield ${2:campo1} // ${3:Tipo}\n\t\tfield ${4:campo2} // ${5:Tipo}\n\t\tfield ${6:campo3} // ${7:Tipo}\n\t\tfield ${8:campo4} // ${9:Tipo}\n\t}\n\n# repeat\nsnippet repeat\n\trepeat ${1:cantidad} {\n\t\t${2:// cuerpo...}\n\t}\n\n# foreach\nsnippet foreach\n\tforeach ${1:\u00EDndice} in ${2:lista} {\n\t\t${3:// cuerpo...}\n\t}\n\n# while\nsnippet while\n\twhile (${1?:condici\u00F3n}) {\n\t\t${2:// cuerpo...}\n\t}\n\n# if\nsnippet if\n\tif (${1?:condici\u00F3n}) {\n\t\t${2:// cuerpo...}\n\t}\n\n# elseif\nsnippet elseif\n\telseif (${1?:condici\u00F3n}) {\n\t\t${2:// cuerpo...}\n\t}\n\n# else\nsnippet else\n\telse {\n\t\t${1:// cuerpo...}\n\t}\n\n# if (con else)\nsnippet if (con else)\n\tif (${1:condici\u00F3n}) {\n\t\t${2:// cuerpo...}\n\t} else {\n\t\t${3:// cuerpo....}\n\t}\n\n# if (con elseif)\nsnippet if (con elseif)\n\tif (${1:condici\u00F3n}) {\n\t\t${2:// cuerpo...}\n\t} elseif (${3:condici\u00F3n}) {\n\t\t${4:// cuerpo...}\n\t}\n\n# if (con elseif y else)\nsnippet if (con elseif y else)\n\tif (${1:condici\u00F3n}) {\n\t\t${2:// cuerpo...}\n\t} elseif (${3:condici\u00F3n}) {\n\t\t${4:// cuerpo...}\n\t} else {\n\t\t${5:// cuerpo....}\n\t}\n\n# if (con 3 elseif)\nsnippet if (con 3 elseif)\n\tif (${1:condici\u00F3n}) {\n\t\t${2:// cuerpo...}\n\t} elseif (${3:condici\u00F3n}) {\n\t\t${4:// cuerpo...}\n\t} elseif (${5:condici\u00F3n}) {\n\t\t${6:// cuerpo...}\n\t} elseif (${7:condici\u00F3n}) {\n\t\t${8:// cuerpo...}\n\t}\n\n# choose (2 valores)\nsnippet choose (2 valores)\n\tchoose\n\t\t${1:Valor1} when (${2:condici\u00F3n})\n\t\t${3:Valor2} otherwise\n\n# choose (2 valores y boom)\nsnippet choose (2 valores y boom)\n\tchoose\n\t\t${1:Valor1} when (${2:condici\u00F3n})\n\t\t${3:Valor2} when (${4:condici\u00F3n})\n\t\t${5:Valor3} when (${6:condici\u00F3n})\n\t\t${7:Valor4} when (${8:condici\u00F3n})\n\t\tboom(\"${9:No es un valor v\u00E1lido}\") otherwise\n\n# matching (4 valores)\nsnippet matching (4 valores)\n\tmatching (${1:variable}) select\n\t\t${2:Valor1} on ${3:opci\u00F3n1}\n\t\t${4:Valor2} on ${5:opci\u00F3n2}\n\t\t${6:Valor3} on ${7:opci\u00F3n3}\n\t\t${8:Valor4} on ${9:opci\u00F3n4}\n\t\tboom(\"${10:No es un valor v\u00E1lido}\") otherwise\n\n# select (4 casos)\nsnippet select (4 casos)\n\tselect\n\t\t${1:Valor1} on (${2:opci\u00F3n1})\n\t\t${3:Valor2} on (${4:opci\u00F3n2})\n\t\t${5:Valor3} on (${6:opci\u00F3n3})\n\t\t${7:Valor4} on (${8:opci\u00F3n4})\n\t\tboom(\"${9:No es un valor v\u00E1lido}\") otherwise\n\n# switch\nsnippet switch\n\tswitch (${1:variable}) {\n\t\t${2:Valor1} -> {${3:// cuerpo...}}\n\t\t${4:Valor2} -> {${5:// cuerpo...}}\n\t\t${6:Valor
});
ace.define("ace/snippets/gobstones",["require","exports","module","ace/snippets/gobstones.snippets"], function(require, exports, module){"use strict";
exports.snippetText = require("./gobstones.snippets");
exports.scope = "gobstones";
}); (function() {
ace.require(["ace/snippets/gobstones"], function(m) {
if (typeof module == "object" && typeof exports == "object" && module) {
module.exports = m;
}
});
})();