Sha256: e6d183404caebdb4692fd1467a0cc951b7c6512e5ec33debb218a3f19a160766

Contents?: true

Size: 1.05 KB

Versions: 19

Compression:

Stored size: 1.05 KB

Contents

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

var PLUSSIGN = TYPE.PlusSign;
var SOLIDUS = TYPE.Solidus;
var GREATERTHANSIGN = TYPE.GreaterThanSign;
var TILDE = TYPE.Tilde;

// + | > | ~ | /deep/
module.exports = {
    name: 'Combinator',
    structure: {
        name: String
    },
    parse: function() {
        var start = this.scanner.tokenStart;

        switch (this.scanner.tokenType) {
            case GREATERTHANSIGN:
            case PLUSSIGN:
            case TILDE:
                this.scanner.next();
                break;

            case SOLIDUS:
                this.scanner.next();
                this.scanner.expectIdentifier('deep');
                this.scanner.eat(SOLIDUS);
                break;

            default:
                this.scanner.error('Combinator is expected');
        }

        return {
            type: 'Combinator',
            loc: this.getLocation(start, this.scanner.tokenStart),
            name: this.scanner.substrToCursor(start)
        };
    },
    generate: function(node) {
        this.chunk(node.name);
    }
};

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/Combinator.js
disco_app-0.18.2 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
disco_app-0.16.1 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
disco_app-0.15.2 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
disco_app-0.18.4 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
disco_app-0.18.1 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
disco_app-0.12.7.pre.puma.pre.3 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
disco_app-0.14.0 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
disco_app-0.13.6.pre.puma.pre.3 test/dummy/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
jester-data-8.0.0 node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
ezii-os-5.2.1 node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
ezii-os-2.0.1 node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
ezii-os-1.1.0 node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
ezii-os-1.0.0 node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
ezii-os-0.0.0.1.0 node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
ezii-os-0.0.0.0.1 node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/css-tree/lib/syntax/node/Combinator.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js
locomotivecms-3.4.0 app/javascript/node_modules/csso/node_modules/css-tree/lib/syntax/node/Combinator.js