azcli.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*---------------------------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for license information.
  4. *--------------------------------------------------------------------------------------------*/
  5. define('vs/basic-languages/azcli/azcli',["require", "exports"], function (require, exports) {
  6. "use strict";
  7. Object.defineProperty(exports, "__esModule", { value: true });
  8. exports.language = exports.conf = void 0;
  9. exports.conf = {
  10. comments: {
  11. lineComment: '#'
  12. }
  13. };
  14. exports.language = {
  15. defaultToken: 'keyword',
  16. ignoreCase: true,
  17. tokenPostfix: '.azcli',
  18. str: /[^#\s]/,
  19. tokenizer: {
  20. root: [
  21. { include: '@comment' },
  22. [
  23. /\s-+@str*\s*/,
  24. {
  25. cases: {
  26. '@eos': { token: 'key.identifier', next: '@popall' },
  27. '@default': { token: 'key.identifier', next: '@type' }
  28. }
  29. }
  30. ],
  31. [
  32. /^-+@str*\s*/,
  33. {
  34. cases: {
  35. '@eos': { token: 'key.identifier', next: '@popall' },
  36. '@default': { token: 'key.identifier', next: '@type' }
  37. }
  38. }
  39. ]
  40. ],
  41. type: [
  42. { include: '@comment' },
  43. [
  44. /-+@str*\s*/,
  45. {
  46. cases: {
  47. '@eos': { token: 'key.identifier', next: '@popall' },
  48. '@default': 'key.identifier'
  49. }
  50. }
  51. ],
  52. [
  53. /@str+\s*/,
  54. {
  55. cases: {
  56. '@eos': { token: 'string', next: '@popall' },
  57. '@default': 'string'
  58. }
  59. }
  60. ]
  61. ],
  62. comment: [
  63. [
  64. /#.*$/,
  65. {
  66. cases: {
  67. '@eos': { token: 'comment', next: '@popall' }
  68. }
  69. }
  70. ]
  71. ]
  72. }
  73. };
  74. });