blob: 4233970226a783f62a73342f90b0ac98700f3a4c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
import * as _ from './utils'
export class TreeWalker {
parentNode(): Node | null {
return null
}
firstChild(): Node | null {
return null
}
lastChild(): Node | null {
return null
}
previousSibling(): Node | null {
return null
}
nextSibling(): Node | null {
return null
}
previousNode(): Node | null {
return null
}
nextNode(): Node | null {
return null
}
get currentNode(): Node {
const internals = _.internalsOf<TreeWalkerInternals>(
this,
'TreeWalker',
'currentNode'
)
return internals.currentNode
}
get root(): Node {
const internals = _.internalsOf<TreeWalkerInternals>(
this,
'TreeWalker',
'root'
)
return internals.root
}
get whatToShow(): number {
const internals = _.internalsOf<TreeWalkerInternals>(
this,
'TreeWalker',
'whatToShow'
)
return internals.whatToShow
}
}
_.allowStringTag(TreeWalker)
export interface TreeWalkerInternals {
filter: NodeFilter
currentNode: Node
root: Node
whatToShow: number
}
|