gobstones.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. ace.define("ace/snippets/gobstones",[], function(require, exports, module) {
  2. "use strict";
  3. exports.snippetText = "# Procedure\n\
  4. snippet proc\n\
  5. procedure ${1?:name}(${2:argument}) {\n\
  6. ${3:// body...}\n\
  7. }\n\
  8. \n\
  9. # Function\n\
  10. snippet fun\n\
  11. function ${1?:name}(${2:argument}) {\n\
  12. return ${3:// body...}\n\
  13. }\n\
  14. \n\
  15. # Repeat\n\
  16. snippet rep\n\
  17. repeat ${1?:times} {\n\
  18. ${2:// body...}\n\
  19. }\n\
  20. \n\
  21. # For\n\
  22. snippet for\n\
  23. foreach ${1?:e} in ${2?:list} {\n\
  24. ${3:// body...} \n\
  25. }\n\
  26. \n\
  27. # If\n\
  28. snippet if\n\
  29. if (${1?:condition}) {\n\
  30. ${3:// body...} \n\
  31. }\n\
  32. \n\
  33. # While\n\
  34. while (${1?:condition}) {\n\
  35. ${2:// body...} \n\
  36. }\n\
  37. ";
  38. exports.scope = "gobstones";
  39. });
  40. (function() {
  41. ace.require(["ace/snippets/gobstones"], function(m) {
  42. if (typeof module == "object" && typeof exports == "object" && module) {
  43. module.exports = m;
  44. }
  45. });
  46. })();