vendor/lib/nodes/charset.js in stylus-source-0.42.2 vs vendor/lib/nodes/charset.js in stylus-source-0.49.3
- old
+ new
@@ -7,12 +7,11 @@
/**
* Module dependencies.
*/
-var Node = require('./node')
- , nodes = require('./');
+var Node = require('./node');
/**
* Initialize a new `Charset` with the given `val`
*
* @param {String} val
@@ -37,6 +36,23 @@
* @api public
*/
Charset.prototype.toString = function(){
return '@charset ' + this.val;
+};
+
+/**
+ * Return a JSON representation of this node.
+ *
+ * @return {Object}
+ * @api public
+ */
+
+Charset.prototype.toJSON = function(){
+ return {
+ __type: 'Charset',
+ val: this.val,
+ lineno: this.lineno,
+ column: this.column,
+ filename: this.filename
+ };
};