@sasjs/cli 4.8.1 → 4.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,9 +67,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
67
67
  exports.generateSnippets = void 0;
68
68
  var utils_1 = require("@sasjs/utils");
69
69
  var path_1 = __importDefault(require("path"));
70
- var sasRegExp = /\.sas$/; // to check if file has .sas extension
71
- var briefRegExp = /^\s\s@brief\s/; // to get lines that has @brief keyword
72
- var paramRegExp = /^\s\s@param\s/; // to get lines that has @param keyword
70
+ // to check if file has .sas extension
71
+ var sasRegExp = /\.sas$/;
72
+ // to get lines that have @brief keyword (case insensitive)
73
+ var briefRegExp = /^\s\s@brief\s/i;
74
+ // to get lines that have @param keyword and optionally [anything] string
75
+ // following it (case insensitive)
76
+ var paramRegExp = /^\s\s@param\s?(\[.*?]\s?)?/i;
73
77
  /**
74
78
  * Generates VS Code snippets from the Doxygen headers in the SAS Macros.
75
79
  * @param macroFolders an array of file paths of SAS Macros.
@@ -114,10 +114,17 @@ describe('sasjs snippets', function () {
114
114
  prefix: '%macro2',
115
115
  body: '%macro2($1)',
116
116
  description: [
117
- 'Macro 2',
117
+ 'Macro 2 with uppercase @BRIEF',
118
118
  '\r',
119
119
  'Params:',
120
- '-msg The message to be printed'
120
+ '-msg The message to be printed',
121
+ '-indlm= ( ) Uppercase @PARAM',
122
+ '-outdlm= ( ) Uppercase [OUT]',
123
+ '-outdlm= ( ) No space after @param',
124
+ '-outdlm= ( ) No space after [out]',
125
+ '-outdlm= ( ) No space after @param and [out]',
126
+ '-scopeds= () with [in,out]',
127
+ '-anything= () with [anything]'
121
128
  ]
122
129
  },
123
130
  badMacro: {
package/package.json CHANGED
@@ -104,5 +104,5 @@
104
104
  "typescript": "4.9.5",
105
105
  "util": "0.12.4"
106
106
  },
107
- "version": "4.8.1"
107
+ "version": "4.10.0"
108
108
  }