azcli.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*!-----------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Version: 0.31.1(337587859b1c171314b40503171188b6cea6a32a)
  4. * Released under the MIT license
  5. * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
  6. *-----------------------------------------------------------------------------*/
  7. // src/basic-languages/azcli/azcli.ts
  8. var conf = {
  9. comments: {
  10. lineComment: "#"
  11. }
  12. };
  13. var language = {
  14. defaultToken: "keyword",
  15. ignoreCase: true,
  16. tokenPostfix: ".azcli",
  17. str: /[^#\s]/,
  18. tokenizer: {
  19. root: [
  20. { include: "@comment" },
  21. [
  22. /\s-+@str*\s*/,
  23. {
  24. cases: {
  25. "@eos": { token: "key.identifier", next: "@popall" },
  26. "@default": { token: "key.identifier", next: "@type" }
  27. }
  28. }
  29. ],
  30. [
  31. /^-+@str*\s*/,
  32. {
  33. cases: {
  34. "@eos": { token: "key.identifier", next: "@popall" },
  35. "@default": { token: "key.identifier", next: "@type" }
  36. }
  37. }
  38. ]
  39. ],
  40. type: [
  41. { include: "@comment" },
  42. [
  43. /-+@str*\s*/,
  44. {
  45. cases: {
  46. "@eos": { token: "key.identifier", next: "@popall" },
  47. "@default": "key.identifier"
  48. }
  49. }
  50. ],
  51. [
  52. /@str+\s*/,
  53. {
  54. cases: {
  55. "@eos": { token: "string", next: "@popall" },
  56. "@default": "string"
  57. }
  58. }
  59. ]
  60. ],
  61. comment: [
  62. [
  63. /#.*$/,
  64. {
  65. cases: {
  66. "@eos": { token: "comment", next: "@popall" }
  67. }
  68. }
  69. ]
  70. ]
  71. }
  72. };
  73. export {
  74. conf,
  75. language
  76. };