Sha256: 46c709225b45c33b39d7be6b12b98bb479689294b2d67dedc4f6593903ce6484

Contents?: true

Size: 1.29 KB

Versions: 19

Compression:

Stored size: 1.29 KB

Contents

var TYPE = require('../../tokenizer').TYPE;

var SEMICOLON = TYPE.Semicolon;
var LEFTCURLYBRACKET = TYPE.LeftCurlyBracket;

module.exports = {
    name: 'AtrulePrelude',
    structure: {
        children: [[]]
    },
    parse: function(name) {
        var children = null;

        if (name !== null) {
            name = name.toLowerCase();
        }

        this.scanner.skipSC();

        if (this.atrule.hasOwnProperty(name) &&
            typeof this.atrule[name].prelude === 'function') {
            // custom consumer
            children = this.atrule[name].prelude.call(this);
        } else {
            // default consumer
            children = this.readSequence(this.scope.AtrulePrelude);
        }

        this.scanner.skipSC();

        if (this.scanner.eof !== true &&
            this.scanner.tokenType !== LEFTCURLYBRACKET &&
            this.scanner.tokenType !== SEMICOLON) {
            this.scanner.error('Semicolon or block is expected');
        }

        if (children === null) {
            children = this.createList();
        }

        return {
            type: 'AtrulePrelude',
            loc: this.getLocationFromList(children),
            children: children
        };
    },
    generate: function(node) {
        this.children(node);
    },
    walkContext: 'atrulePrelude'
};

Version data entries

19 entries across 18 versions & 4 rubygems

Version Path
disco_app-0.18.0 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
disco_app-0.18.2 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
disco_app-0.16.1 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
disco_app-0.15.2 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
disco_app-0.18.4 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
disco_app-0.18.1 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
disco_app-0.14.0 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
jester-data-8.0.0 node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
ezii-os-5.2.1 node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
ezii-os-2.0.1 node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
ezii-os-1.1.0 node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
ezii-os-1.0.0 node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
ezii-os-0.0.0.1.0 node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
ezii-os-0.0.0.0.1 node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js
locomotivecms-3.4.0 app/javascript/node_modules/csso/node_modules/css-tree/lib/syntax/node/AtrulePrelude.js