Last change
on this file since 8d391a1 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
576 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | var walk = require('css-tree').walk;
|
---|
| 2 | var handlers = {
|
---|
| 3 | Atrule: require('./Atrule'),
|
---|
| 4 | Comment: require('./Comment'),
|
---|
| 5 | Declaration: require('./Declaration'),
|
---|
| 6 | Raw: require('./Raw'),
|
---|
| 7 | Rule: require('./Rule'),
|
---|
| 8 | TypeSelector: require('./TypeSelector'),
|
---|
| 9 | WhiteSpace: require('./WhiteSpace')
|
---|
| 10 | };
|
---|
| 11 |
|
---|
| 12 | module.exports = function(ast, options) {
|
---|
| 13 | walk(ast, {
|
---|
| 14 | leave: function(node, item, list) {
|
---|
| 15 | if (handlers.hasOwnProperty(node.type)) {
|
---|
| 16 | handlers[node.type].call(this, node, item, list, options);
|
---|
| 17 | }
|
---|
| 18 | }
|
---|
| 19 | });
|
---|
| 20 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.