pacc 8.8.0 → 8.9.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.
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/common-attributes.mjs +1 -0
- package/src/expression.mjs +13 -2
- package/types/common-attributes.d.mts +1 -0
- package/types/expression.d.mts +1 -0
package/README.md
CHANGED
package/package.json
CHANGED
package/src/expression.mjs
CHANGED
|
@@ -43,9 +43,19 @@ export function parseOnly(input, context = {}) {
|
|
|
43
43
|
const nud = (last, left) => {
|
|
44
44
|
switch (last) {
|
|
45
45
|
case OPEN_ROUND: {
|
|
46
|
-
|
|
46
|
+
|
|
47
|
+
const sequence = [];
|
|
48
|
+
|
|
49
|
+
while (token !== CLOSE_ROUND) {
|
|
50
|
+
sequence.push(expression(0));
|
|
51
|
+
if (token === COMMA) {
|
|
52
|
+
advance();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
47
55
|
expect(CLOSE_ROUND);
|
|
48
|
-
|
|
56
|
+
|
|
57
|
+
// TODO always a sequence ?
|
|
58
|
+
return sequence.length > 1 ? sequence : sequence[0];
|
|
49
59
|
}
|
|
50
60
|
case OPEN_BRACKET: {
|
|
51
61
|
if (token === CLOSE_BRACKET) {
|
|
@@ -171,6 +181,7 @@ export const globals = {
|
|
|
171
181
|
decodeURI: decodeURI,
|
|
172
182
|
encodeURIComponent: encodeURIComponent,
|
|
173
183
|
decodeURIComponent: decodeURIComponent,
|
|
184
|
+
trim: a => a.trim(),
|
|
174
185
|
uppercase: a => a.toUpperCase(),
|
|
175
186
|
lowercase: a => a.toLowerCase(),
|
|
176
187
|
substring: (s, a, b) => s.substring(a, b),
|
|
@@ -203,6 +203,7 @@ export const title_attribute_writable: AttributeDefinition;
|
|
|
203
203
|
*/
|
|
204
204
|
export const priority_attribute: AttributeDefinition;
|
|
205
205
|
/**
|
|
206
|
+
* Duration in seconds.
|
|
206
207
|
* @type {AttributeDefinition}
|
|
207
208
|
*/
|
|
208
209
|
export const duration_attribute: AttributeDefinition;
|
package/types/expression.d.mts
CHANGED
|
@@ -12,6 +12,7 @@ export namespace globals {
|
|
|
12
12
|
export let decodeURI: typeof globalThis.decodeURI;
|
|
13
13
|
export let encodeURIComponent: typeof globalThis.encodeURIComponent;
|
|
14
14
|
export let decodeURIComponent: typeof globalThis.decodeURIComponent;
|
|
15
|
+
export function trim(a: any): any;
|
|
15
16
|
export function uppercase(a: any): any;
|
|
16
17
|
export function lowercase(a: any): any;
|
|
17
18
|
export function substring(s: any, a: any, b: any): any;
|