|
3 | 3 | *Please use only this documented API when working with the parser. Methods
|
4 | 4 | not documented here are subject to change at any point.*
|
5 | 5 |
|
| 6 | +<!-- toc --> |
| 7 | + |
| 8 | +- [`parser` function](#parser-function) |
| 9 | + * [`parser.atword([props])`](#parseratwordprops) |
| 10 | + * [`parser.colon([props])`](#parsercolonprops) |
| 11 | + * [`parser.comma([props])`](#parsercommaprops) |
| 12 | + * [`parser.comment([props])`](#parsercommentprops) |
| 13 | + * [`parser.func([props])`](#parserfuncprops) |
| 14 | + * [`parser.number([props])`](#parsernumberprops) |
| 15 | + * [`parser.operator([props])`](#parseroperatorprops) |
| 16 | + * [`parser.paren([props])`](#parserparenprops) |
| 17 | + * [`parser.string([props])`](#parserstringprops) |
| 18 | + * [`parser.value([props])`](#parservalueprops) |
| 19 | + * [`parser.word([props])`](#parserwordprops) |
| 20 | +- [Node types](#node-types) |
| 21 | + * [`node.type`](#nodetype) |
| 22 | + * [`node.parent`](#nodeparent) |
| 23 | + * [`node.toString()`, `String(node)`, or `'' + node`](#nodetostring-stringnode-or---node) |
| 24 | + * [`node.next()` & `node.prev()`](#nodenext--nodeprev) |
| 25 | + * [`node.replaceWith(node)`](#nodereplacewithnode) |
| 26 | + * [`node.remove()`](#noderemove) |
| 27 | + * [`node.clone()`](#nodeclone) |
| 28 | + * [`node.raws`](#noderaws) |
| 29 | + * [`node.source`](#nodesource) |
| 30 | + * [`node.sourceIndex`](#nodesourceindex) |
| 31 | +- [Container types](#container-types) |
| 32 | + * [`container.nodes`](#containernodes) |
| 33 | + * [`container.first` & `container.last`](#containerfirst--containerlast) |
| 34 | + * [`container.at(index)`](#containeratindex) |
| 35 | + * [`container.index(node)`](#containerindexnode) |
| 36 | + * [`container.length`](#containerlength) |
| 37 | + * [`container.each(callback)`](#containereachcallback) |
| 38 | + * [`container.walk(callback)`](#containerwalkcallback) |
| 39 | + * [`container.walk` proxies](#containerwalk-proxies) |
| 40 | + * [`container.prepend(node)` & `container.append(node)`](#containerprependnode--containerappendnode) |
| 41 | + * [`container.insertBefore(old, new)` & `container.insertAfter(old, new)`](#containerinsertbeforeold-new--containerinsertafterold-new) |
| 42 | + * [`container.removeChild(node)`](#containerremovechildnode) |
| 43 | + * [`container.removeAll()` or `container.empty()`](#containerremoveall-or-containerempty) |
| 44 | +- [Root nodes`](#root-nodes) |
| 45 | +- [Value nodes](#value-nodes) |
| 46 | + |
| 47 | +<!-- tocstop --> |
| 48 | + |
6 | 49 | ## `parser` function
|
7 | 50 |
|
8 | 51 | This is the module's main entry point, and returns a `new Parser`.
|
|
0 commit comments