dart.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. ace.define("ace/snippets/dart",[], function(require, exports, module) {
  2. "use strict";
  3. exports.snippetText = "snippet lib\n\
  4. library ${1};\n\
  5. ${2}\n\
  6. snippet im\n\
  7. import '${1}';\n\
  8. ${2}\n\
  9. snippet pa\n\
  10. part '${1}';\n\
  11. ${2}\n\
  12. snippet pao\n\
  13. part of ${1};\n\
  14. ${2}\n\
  15. snippet main\n\
  16. void main() {\n\
  17. ${1:/* code */}\n\
  18. }\n\
  19. snippet st\n\
  20. static ${1}\n\
  21. snippet fi\n\
  22. final ${1}\n\
  23. snippet re\n\
  24. return ${1}\n\
  25. snippet br\n\
  26. break;\n\
  27. snippet th\n\
  28. throw ${1}\n\
  29. snippet cl\n\
  30. class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\
  31. snippet imp\n\
  32. implements ${1}\n\
  33. snippet ext\n\
  34. extends ${1}\n\
  35. snippet if\n\
  36. if (${1:true}) {\n\
  37. ${2}\n\
  38. }\n\
  39. snippet ife\n\
  40. if (${1:true}) {\n\
  41. ${2}\n\
  42. } else {\n\
  43. ${3}\n\
  44. }\n\
  45. snippet el\n\
  46. else\n\
  47. snippet sw\n\
  48. switch (${1}) {\n\
  49. ${2}\n\
  50. }\n\
  51. snippet cs\n\
  52. case ${1}:\n\
  53. ${2}\n\
  54. snippet de\n\
  55. default:\n\
  56. ${1}\n\
  57. snippet for\n\
  58. for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {\n\
  59. ${4:$1[$2]}\n\
  60. }\n\
  61. snippet fore\n\
  62. for (final ${2:item} in ${1:itemList}) {\n\
  63. ${3:/* code */}\n\
  64. }\n\
  65. snippet wh\n\
  66. while (${1:/* condition */}) {\n\
  67. ${2:/* code */}\n\
  68. }\n\
  69. snippet dowh\n\
  70. do {\n\
  71. ${2:/* code */}\n\
  72. } while (${1:/* condition */});\n\
  73. snippet as\n\
  74. assert(${1:/* condition */});\n\
  75. snippet try\n\
  76. try {\n\
  77. ${2}\n\
  78. } catch (${1:Exception e}) {\n\
  79. }\n\
  80. snippet tryf\n\
  81. try {\n\
  82. ${2}\n\
  83. } catch (${1:Exception e}) {\n\
  84. } finally {\n\
  85. }\n\
  86. ";
  87. exports.scope = "dart";
  88. });
  89. (function() {
  90. ace.require(["ace/snippets/dart"], function(m) {
  91. if (typeof module == "object" && typeof exports == "object" && module) {
  92. module.exports = m;
  93. }
  94. });
  95. })();