@depup/postcss 8.5.8-depup.0 → 8.5.21-depup.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/LICENSE +1 -1
- package/README.md +3 -3
- package/changes.json +3 -3
- package/lib/at-rule.d.ts +0 -1
- package/lib/comment.d.ts +0 -1
- package/lib/container.d.ts +1 -6
- package/lib/container.js +81 -34
- package/lib/css-syntax-error.d.ts +0 -1
- package/lib/declaration.d.ts +0 -1
- package/lib/document.d.ts +0 -1
- package/lib/fromJSON.d.ts +1 -1
- package/lib/fromJSON.js +76 -23
- package/lib/input.d.ts +0 -1
- package/lib/input.js +22 -5
- package/lib/lazy-result.d.ts +3 -4
- package/lib/lazy-result.js +68 -13
- package/lib/list.d.ts +1 -1
- package/lib/no-work-result.d.ts +0 -1
- package/lib/no-work-result.js +1 -1
- package/lib/node.d.ts +2 -3
- package/lib/node.js +105 -60
- package/lib/parse.d.ts +1 -1
- package/lib/parser.js +36 -29
- package/lib/postcss.d.mts +0 -3
- package/lib/postcss.d.ts +10 -4
- package/lib/previous-map.d.ts +0 -1
- package/lib/previous-map.js +32 -6
- package/lib/processor.d.ts +0 -1
- package/lib/processor.js +1 -1
- package/lib/result.d.ts +0 -1
- package/lib/root.d.ts +0 -1
- package/lib/root.js +16 -1
- package/lib/rule.d.ts +12 -12
- package/lib/stringifier.d.ts +0 -1
- package/lib/stringifier.js +136 -32
- package/lib/stringify.d.ts +1 -1
- package/lib/tokenize.js +4 -0
- package/lib/warning.d.ts +0 -1
- package/lib/warning.js +10 -0
- package/package.json +54 -52
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright 2013 Andrey Sitnik <andrey@sitnik.
|
|
3
|
+
Copyright 2013 Andrey Sitnik <andrey@sitnik.es>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/postcss
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [postcss](https://www.npmjs.com/package/postcss) @ 8.5.
|
|
17
|
-
| Processed | 2026-
|
|
16
|
+
| Original | [postcss](https://www.npmjs.com/package/postcss) @ 8.5.21 |
|
|
17
|
+
| Processed | 2026-07-21 |
|
|
18
18
|
| Smoke test | passed |
|
|
19
19
|
| Deps updated | 1 |
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ npm install @depup/postcss
|
|
|
22
22
|
|
|
23
23
|
| Dependency | From | To |
|
|
24
24
|
|------------|------|-----|
|
|
25
|
-
| nanoid | ^3.3.
|
|
25
|
+
| nanoid | ^3.3.16 | ^6.0.0 |
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
package/changes.json
CHANGED
package/lib/at-rule.d.ts
CHANGED
package/lib/comment.d.ts
CHANGED
package/lib/container.d.ts
CHANGED
|
@@ -8,11 +8,7 @@ import Rule from './rule.js'
|
|
|
8
8
|
declare namespace Container {
|
|
9
9
|
export type ContainerWithChildren<Child extends Node = ChildNode> = {
|
|
10
10
|
nodes: Child[]
|
|
11
|
-
} & (
|
|
12
|
-
| AtRule
|
|
13
|
-
| Root
|
|
14
|
-
| Rule
|
|
15
|
-
)
|
|
11
|
+
} & (AtRule | Root | Rule)
|
|
16
12
|
|
|
17
13
|
export interface ValueOptions {
|
|
18
14
|
/**
|
|
@@ -43,7 +39,6 @@ declare namespace Container {
|
|
|
43
39
|
| string
|
|
44
40
|
| undefined
|
|
45
41
|
|
|
46
|
-
|
|
47
42
|
export { Container_ as default }
|
|
48
43
|
}
|
|
49
44
|
|
package/lib/container.js
CHANGED
|
@@ -8,18 +8,25 @@ let { isClean, my } = require('./symbols')
|
|
|
8
8
|
let AtRule, parse, Root, Rule
|
|
9
9
|
|
|
10
10
|
function cleanSource(nodes) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
let stack = nodes.slice()
|
|
12
|
+
while (stack.length > 0) {
|
|
13
|
+
let node = stack.pop()
|
|
14
|
+
delete node.source
|
|
15
|
+
if (node.nodes) {
|
|
16
|
+
node.nodes = node.nodes.slice()
|
|
17
|
+
for (let i of node.nodes) stack.push(i)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return nodes.slice()
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
function markTreeDirty(node) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
let stack = [node]
|
|
25
|
+
while (stack.length > 0) {
|
|
26
|
+
let next = stack.pop()
|
|
27
|
+
next[isClean] = false
|
|
28
|
+
if (next.proxyOf.nodes) {
|
|
29
|
+
for (let i of next.proxyOf.nodes) stack.push(i)
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
32
|
}
|
|
@@ -47,9 +54,18 @@ class Container extends Node {
|
|
|
47
54
|
}
|
|
48
55
|
|
|
49
56
|
cleanRaws(keepBetween) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
let stack = [this]
|
|
58
|
+
while (stack.length > 0) {
|
|
59
|
+
let node = stack.pop()
|
|
60
|
+
if (node !== this && node.cleanRaws !== Container.prototype.cleanRaws) {
|
|
61
|
+
// Subclass with own logic; let it handle its subtree
|
|
62
|
+
node.cleanRaws(keepBetween)
|
|
63
|
+
continue
|
|
64
|
+
}
|
|
65
|
+
Node.prototype.cleanRaws.call(node, keepBetween)
|
|
66
|
+
if (node.nodes) {
|
|
67
|
+
for (let child of node.nodes) stack.push(child)
|
|
68
|
+
}
|
|
53
69
|
}
|
|
54
70
|
}
|
|
55
71
|
|
|
@@ -309,19 +325,48 @@ class Container extends Node {
|
|
|
309
325
|
}
|
|
310
326
|
|
|
311
327
|
walk(callback) {
|
|
312
|
-
|
|
328
|
+
if (!this.proxyOf.nodes) return undefined
|
|
329
|
+
|
|
330
|
+
// An explicit stack instead of recursive `each()` calls to survive
|
|
331
|
+
// deeply nested trees. Each frame keeps a live `indexes` slot, so
|
|
332
|
+
// insertion and removal during the walk behave like `each()`: the
|
|
333
|
+
// slot stays at the current child until its subtree is finished.
|
|
334
|
+
let stack = [{ iterator: this.getIterator(), node: this.proxyOf }]
|
|
335
|
+
|
|
336
|
+
while (stack.length > 0) {
|
|
337
|
+
let { iterator, node } = stack[stack.length - 1]
|
|
338
|
+
let index = node.indexes[iterator]
|
|
339
|
+
|
|
340
|
+
if (index >= node.proxyOf.nodes.length) {
|
|
341
|
+
delete node.indexes[iterator]
|
|
342
|
+
stack.pop()
|
|
343
|
+
let parent = stack[stack.length - 1]
|
|
344
|
+
// Finish the parent’s step for the child subtree we just left
|
|
345
|
+
if (parent) parent.node.indexes[parent.iterator] += 1
|
|
346
|
+
continue
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
let child = node.proxyOf.nodes[index]
|
|
313
350
|
let result
|
|
314
351
|
try {
|
|
315
|
-
result = callback(child,
|
|
352
|
+
result = callback(child, index)
|
|
316
353
|
} catch (e) {
|
|
317
354
|
throw child.addToError(e)
|
|
318
355
|
}
|
|
319
|
-
if (result
|
|
320
|
-
|
|
356
|
+
if (result === false) {
|
|
357
|
+
for (let opened of stack) {
|
|
358
|
+
delete opened.node.indexes[opened.iterator]
|
|
359
|
+
}
|
|
360
|
+
return false
|
|
361
|
+
}
|
|
362
|
+
if (child.walk && child.proxyOf.nodes) {
|
|
363
|
+
stack.push({ iterator: child.getIterator(), node: child })
|
|
364
|
+
} else {
|
|
365
|
+
node.indexes[iterator] += 1
|
|
321
366
|
}
|
|
367
|
+
}
|
|
322
368
|
|
|
323
|
-
|
|
324
|
-
})
|
|
369
|
+
return undefined
|
|
325
370
|
}
|
|
326
371
|
|
|
327
372
|
walkAtRules(name, callback) {
|
|
@@ -424,24 +469,26 @@ Container.default = Container
|
|
|
424
469
|
|
|
425
470
|
/* c8 ignore start */
|
|
426
471
|
Container.rebuild = node => {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
472
|
+
let stack = [node]
|
|
473
|
+
while (stack.length > 0) {
|
|
474
|
+
let next = stack.pop()
|
|
475
|
+
if (next.type === 'atrule') {
|
|
476
|
+
Object.setPrototypeOf(next, AtRule.prototype)
|
|
477
|
+
} else if (next.type === 'rule') {
|
|
478
|
+
Object.setPrototypeOf(next, Rule.prototype)
|
|
479
|
+
} else if (next.type === 'decl') {
|
|
480
|
+
Object.setPrototypeOf(next, Declaration.prototype)
|
|
481
|
+
} else if (next.type === 'comment') {
|
|
482
|
+
Object.setPrototypeOf(next, Comment.prototype)
|
|
483
|
+
} else if (next.type === 'root') {
|
|
484
|
+
Object.setPrototypeOf(next, Root.prototype)
|
|
485
|
+
}
|
|
438
486
|
|
|
439
|
-
|
|
487
|
+
next[my] = true
|
|
440
488
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
})
|
|
489
|
+
if (next.nodes) {
|
|
490
|
+
for (let child of next.nodes) stack.push(child)
|
|
491
|
+
}
|
|
445
492
|
}
|
|
446
493
|
}
|
|
447
494
|
/* c8 ignore stop */
|
package/lib/declaration.d.ts
CHANGED
package/lib/document.d.ts
CHANGED
package/lib/fromJSON.d.ts
CHANGED
package/lib/fromJSON.js
CHANGED
|
@@ -8,26 +8,24 @@ let PreviousMap = require('./previous-map')
|
|
|
8
8
|
let Root = require('./root')
|
|
9
9
|
let Rule = require('./rule')
|
|
10
10
|
|
|
11
|
-
function
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (inputHydrated.map) {
|
|
20
|
-
inputHydrated.map = {
|
|
21
|
-
...inputHydrated.map,
|
|
22
|
-
__proto__: PreviousMap.prototype
|
|
23
|
-
}
|
|
11
|
+
function hydrateInputs(json, inputs) {
|
|
12
|
+
if (!json.inputs) return inputs
|
|
13
|
+
return json.inputs.map(input => {
|
|
14
|
+
let inputHydrated = { ...input, __proto__: Input.prototype }
|
|
15
|
+
if (inputHydrated.map) {
|
|
16
|
+
inputHydrated.map = {
|
|
17
|
+
...inputHydrated.map,
|
|
18
|
+
__proto__: PreviousMap.prototype
|
|
24
19
|
}
|
|
25
|
-
inputs.push(inputHydrated)
|
|
26
20
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
21
|
+
return inputHydrated
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function constructNode(json, inputs, children) {
|
|
26
|
+
let defaults = { ...json }
|
|
27
|
+
delete defaults.inputs
|
|
28
|
+
delete defaults.nodes
|
|
31
29
|
if (defaults.source) {
|
|
32
30
|
let { inputId, ...source } = defaults.source
|
|
33
31
|
defaults.source = source
|
|
@@ -35,19 +33,74 @@ function fromJSON(json, inputs) {
|
|
|
35
33
|
defaults.source.input = inputs[inputId]
|
|
36
34
|
}
|
|
37
35
|
}
|
|
36
|
+
|
|
37
|
+
let node
|
|
38
38
|
if (defaults.type === 'root') {
|
|
39
|
-
|
|
39
|
+
node = new Root(defaults)
|
|
40
40
|
} else if (defaults.type === 'decl') {
|
|
41
|
-
|
|
41
|
+
node = new Declaration(defaults)
|
|
42
42
|
} else if (defaults.type === 'rule') {
|
|
43
|
-
|
|
43
|
+
node = new Rule(defaults)
|
|
44
44
|
} else if (defaults.type === 'comment') {
|
|
45
|
-
|
|
45
|
+
node = new Comment(defaults)
|
|
46
46
|
} else if (defaults.type === 'atrule') {
|
|
47
|
-
|
|
47
|
+
node = new AtRule(defaults)
|
|
48
48
|
} else {
|
|
49
49
|
throw new Error('Unknown node type: ' + json.type)
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
// Rehydrated children are attached after construction. Passing them
|
|
53
|
+
// through the container constructor would re-run insertion spacing
|
|
54
|
+
// normalization and overwrite each child's own `raws.before`.
|
|
55
|
+
if (children) {
|
|
56
|
+
node.nodes = children
|
|
57
|
+
for (let child of children) child.parent = node
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return node
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function fromJSON(json, inputs) {
|
|
64
|
+
if (Array.isArray(json)) return json.map(n => fromJSON(n))
|
|
65
|
+
|
|
66
|
+
// An explicit stack instead of recursive calls to survive deeply
|
|
67
|
+
// nested trees. Children are rehydrated before their parent node
|
|
68
|
+
// is constructed.
|
|
69
|
+
let result
|
|
70
|
+
let stack = [
|
|
71
|
+
{ childIndex: 0, children: [], inputs: hydrateInputs(json, inputs), json }
|
|
72
|
+
]
|
|
73
|
+
|
|
74
|
+
while (stack.length > 0) {
|
|
75
|
+
let frame = stack[stack.length - 1]
|
|
76
|
+
let jsonNodes = frame.json.nodes
|
|
77
|
+
|
|
78
|
+
if (jsonNodes && frame.childIndex < jsonNodes.length) {
|
|
79
|
+
let childJson = jsonNodes[frame.childIndex]
|
|
80
|
+
frame.childIndex += 1
|
|
81
|
+
stack.push({
|
|
82
|
+
childIndex: 0,
|
|
83
|
+
children: [],
|
|
84
|
+
inputs: hydrateInputs(childJson, frame.inputs),
|
|
85
|
+
json: childJson
|
|
86
|
+
})
|
|
87
|
+
continue
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
stack.pop()
|
|
91
|
+
let node = constructNode(
|
|
92
|
+
frame.json,
|
|
93
|
+
frame.inputs,
|
|
94
|
+
jsonNodes ? frame.children : undefined
|
|
95
|
+
)
|
|
96
|
+
if (stack.length > 0) {
|
|
97
|
+
stack[stack.length - 1].children.push(node)
|
|
98
|
+
} else {
|
|
99
|
+
result = node
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return result
|
|
51
104
|
}
|
|
52
105
|
|
|
53
106
|
module.exports = fromJSON
|
package/lib/input.d.ts
CHANGED
package/lib/input.js
CHANGED
|
@@ -142,7 +142,15 @@ class Input {
|
|
|
142
142
|
)
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
result.input = {
|
|
145
|
+
result.input = {
|
|
146
|
+
column,
|
|
147
|
+
endColumn,
|
|
148
|
+
endLine,
|
|
149
|
+
endOffset,
|
|
150
|
+
line,
|
|
151
|
+
offset,
|
|
152
|
+
source: this.css
|
|
153
|
+
}
|
|
146
154
|
if (this.file) {
|
|
147
155
|
if (pathToFileURL) {
|
|
148
156
|
result.input.url = pathToFileURL(this.file).toString()
|
|
@@ -198,12 +206,21 @@ class Input {
|
|
|
198
206
|
if (!this.map) return false
|
|
199
207
|
let consumer = this.map.consumer()
|
|
200
208
|
|
|
201
|
-
let from = consumer.originalPositionFor({ column, line })
|
|
209
|
+
let from = consumer.originalPositionFor({ column: column - 1, line })
|
|
202
210
|
if (!from.source) return false
|
|
203
211
|
|
|
204
212
|
let to
|
|
205
213
|
if (typeof endLine === 'number') {
|
|
206
|
-
|
|
214
|
+
let toPosition = consumer.originalPositionFor({
|
|
215
|
+
column: endColumn - 1,
|
|
216
|
+
line: endLine
|
|
217
|
+
})
|
|
218
|
+
// The source map may not have a mapping that covers the end position
|
|
219
|
+
// (`originalPositionFor()` then returns `null` for `line`/`column`
|
|
220
|
+
// instead of omitting them). Treat that the same as not requesting
|
|
221
|
+
// an end position at all, so `endLine`/`endColumn` stay a consistent
|
|
222
|
+
// `undefined` pair instead of a mix of `null` and a bogus number.
|
|
223
|
+
if (toPosition.source) to = toPosition
|
|
207
224
|
}
|
|
208
225
|
|
|
209
226
|
let fromUrl
|
|
@@ -218,8 +235,8 @@ class Input {
|
|
|
218
235
|
}
|
|
219
236
|
|
|
220
237
|
let result = {
|
|
221
|
-
column: from.column,
|
|
222
|
-
endColumn: to && to.column,
|
|
238
|
+
column: from.column + 1,
|
|
239
|
+
endColumn: to && to.column + 1,
|
|
223
240
|
endLine: to && to.line,
|
|
224
241
|
line: from.line,
|
|
225
242
|
url: fromUrl.toString()
|
package/lib/lazy-result.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import Root from './root.js'
|
|
|
6
6
|
import Warning from './warning.js'
|
|
7
7
|
|
|
8
8
|
declare namespace LazyResult {
|
|
9
|
-
|
|
10
9
|
export { LazyResult_ as default }
|
|
11
10
|
}
|
|
12
11
|
|
|
@@ -19,9 +18,9 @@ declare namespace LazyResult {
|
|
|
19
18
|
* const lazy = postcss([autoprefixer]).process(css)
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
|
-
declare class LazyResult_<RootNode = Document | Root>
|
|
23
|
-
|
|
24
|
-
{
|
|
21
|
+
declare class LazyResult_<RootNode = Document | Root> implements PromiseLike<
|
|
22
|
+
Result<RootNode>
|
|
23
|
+
> {
|
|
25
24
|
/**
|
|
26
25
|
* Processes input CSS through synchronous and asynchronous plugins
|
|
27
26
|
* and calls onRejected for each error thrown in any plugin.
|
package/lib/lazy-result.js
CHANGED
|
@@ -97,8 +97,14 @@ function toStack(node) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
function cleanMarks(node) {
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
let stack = [node]
|
|
101
|
+
while (stack.length > 0) {
|
|
102
|
+
let next = stack.pop()
|
|
103
|
+
next[isClean] = false
|
|
104
|
+
if (next.nodes) {
|
|
105
|
+
for (let i of next.nodes) stack.push(i)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
102
108
|
return node
|
|
103
109
|
}
|
|
104
110
|
|
|
@@ -378,6 +384,19 @@ class LazyResult {
|
|
|
378
384
|
if (opts.stringifier) str = opts.stringifier
|
|
379
385
|
if (str.stringify) str = str.stringify
|
|
380
386
|
|
|
387
|
+
let rootSource = this.result.root.source
|
|
388
|
+
if (
|
|
389
|
+
opts.map === undefined &&
|
|
390
|
+
!(rootSource && rootSource.input && rootSource.input.map)
|
|
391
|
+
) {
|
|
392
|
+
let result = ''
|
|
393
|
+
str(this.result.root, i => {
|
|
394
|
+
result += i
|
|
395
|
+
})
|
|
396
|
+
this.result.css = result
|
|
397
|
+
return this.result
|
|
398
|
+
}
|
|
399
|
+
|
|
381
400
|
let map = new MapGenerator(str, this.result.root, this.result.opts)
|
|
382
401
|
let data = map.generate()
|
|
383
402
|
this.result.css = data[0]
|
|
@@ -516,21 +535,57 @@ class LazyResult {
|
|
|
516
535
|
}
|
|
517
536
|
|
|
518
537
|
walkSync(node) {
|
|
538
|
+
// An explicit stack like in async `visitTick()` to survive deeply
|
|
539
|
+
// nested trees. Unlike `visitTick()`, nodes are marked clean only
|
|
540
|
+
// on entering, so a node dirtied by its own visitors is revisited
|
|
541
|
+
// on the next pass.
|
|
519
542
|
node[isClean] = true
|
|
520
|
-
let
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
543
|
+
let stack = [{ eventIndex: 0, events: getEvents(node), iterator: 0, node }]
|
|
544
|
+
|
|
545
|
+
while (stack.length > 0) {
|
|
546
|
+
let visit = stack[stack.length - 1]
|
|
547
|
+
let visitNode = visit.node
|
|
548
|
+
|
|
549
|
+
if (visit.iterator !== 0) {
|
|
550
|
+
let iterator = visit.iterator
|
|
551
|
+
let child
|
|
552
|
+
let descended = false
|
|
553
|
+
while ((child = visitNode.nodes[visitNode.indexes[iterator]])) {
|
|
554
|
+
visitNode.indexes[iterator] += 1
|
|
555
|
+
if (!child[isClean]) {
|
|
556
|
+
child[isClean] = true
|
|
557
|
+
stack.push({
|
|
558
|
+
eventIndex: 0,
|
|
559
|
+
events: getEvents(child),
|
|
560
|
+
iterator: 0,
|
|
561
|
+
node: child
|
|
562
|
+
})
|
|
563
|
+
descended = true
|
|
564
|
+
break
|
|
565
|
+
}
|
|
527
566
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
567
|
+
if (descended) continue
|
|
568
|
+
visit.iterator = 0
|
|
569
|
+
delete visitNode.indexes[iterator]
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
if (visit.eventIndex < visit.events.length) {
|
|
573
|
+
let event = visit.events[visit.eventIndex]
|
|
574
|
+
visit.eventIndex += 1
|
|
575
|
+
if (event === CHILDREN) {
|
|
576
|
+
if (visitNode.nodes && visitNode.nodes.length) {
|
|
577
|
+
visit.iterator = visitNode.getIterator()
|
|
578
|
+
}
|
|
579
|
+
} else {
|
|
580
|
+
let visitors = this.listeners[event]
|
|
581
|
+
if (visitors) {
|
|
582
|
+
if (this.visitSync(visitors, visitNode.toProxy())) stack.pop()
|
|
583
|
+
}
|
|
532
584
|
}
|
|
585
|
+
continue
|
|
533
586
|
}
|
|
587
|
+
|
|
588
|
+
stack.pop()
|
|
534
589
|
}
|
|
535
590
|
}
|
|
536
591
|
|
package/lib/list.d.ts
CHANGED
package/lib/no-work-result.d.ts
CHANGED
package/lib/no-work-result.js
CHANGED
package/lib/node.d.ts
CHANGED
|
@@ -31,12 +31,12 @@ declare namespace Node {
|
|
|
31
31
|
|
|
32
32
|
export interface Position {
|
|
33
33
|
/**
|
|
34
|
-
* Source
|
|
34
|
+
* Source column in file. It starts from 1.
|
|
35
35
|
*/
|
|
36
36
|
column: number
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
* Source
|
|
39
|
+
* Source line in file. It starts from 1.
|
|
40
40
|
*/
|
|
41
41
|
line: number
|
|
42
42
|
|
|
@@ -126,7 +126,6 @@ declare namespace Node {
|
|
|
126
126
|
word?: string
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
130
129
|
class Node extends Node_ {}
|
|
131
130
|
export { Node as default }
|
|
132
131
|
}
|