gobstones.js 721 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ace.define("ace/snippets/gobstones",["require","exports","module"], 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. });