Sha256: 6a4c587fc9cd6fe6330bf4b507c2fef6e5f9caf275787c4974d08e6a7f6bb6d7

Contents?: true

Size: 707 Bytes

Versions: 5

Compression:

Stored size: 707 Bytes

Contents

var Node = require("./node");

var Assignment = function (key, val) {
    this.key = key;
    this.value = val;
};

Assignment.prototype = new Node();
Assignment.prototype.type = "Assignment";
Assignment.prototype.accept = function (visitor) {
    this.value = visitor.visit(this.value);
};
Assignment.prototype.eval = function (context) {
    if (this.value.eval) {
        return new Assignment(this.key, this.value.eval(context));
    }
    return this;
};
Assignment.prototype.genCSS = function (context, output) {
    output.add(this.key + '=');
    if (this.value.genCSS) {
        this.value.genCSS(context, output);
    } else {
        output.add(this.value);
    }
};
module.exports = Assignment;

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
ilog-0.4.1 node_modules/less/lib/less/tree/assignment.js
ilog-0.4.0 node_modules/less/lib/less/tree/assignment.js
ilog-0.3.3 node_modules/less/lib/less/tree/assignment.js
less-execjs-2.6.0.4 lib/less/js/less/lib/less/tree/assignment.js
less-execjs-2.6.0.3 lib/less/js/less/lib/less/tree/assignment.js