lua.js 596 B

12345678910111213141516171819202122232425262728
  1. ace.define("ace/snippets/lua",["require","exports","module"], function(require, exports, module) {
  2. "use strict";
  3. exports.snippetText = "snippet #!\n\
  4. #!/usr/bin/env lua\n\
  5. $1\n\
  6. snippet local\n\
  7. local ${1:x} = ${2:1}\n\
  8. snippet fun\n\
  9. function ${1:fname}(${2:...})\n\
  10. ${3:-- body}\n\
  11. end\n\
  12. snippet for\n\
  13. for ${1:i}=${2:1},${3:10} do\n\
  14. ${4:print(i)}\n\
  15. end\n\
  16. snippet forp\n\
  17. for ${1:i},${2:v} in pairs(${3:table_name}) do\n\
  18. ${4:-- body}\n\
  19. end\n\
  20. snippet fori\n\
  21. for ${1:i},${2:v} in ipairs(${3:table_name}) do\n\
  22. ${4:-- body}\n\
  23. end\n\
  24. ";
  25. exports.scope = "lua";
  26. });