UNPKG

505 BJavaScriptView Raw
1'use strict';
2
3var Node = require('./node');
4
5/**
6 * Initialize a `Comment` with the given `val`, optionally `buffer`,
7 * otherwise the comment may render in the output.
8 *
9 * @param {String} val
10 * @param {Boolean} buffer
11 * @api public
12 */
13
14var Comment = module.exports = function Comment(val, buffer) {
15 this.val = val;
16 this.buffer = buffer;
17};
18
19// Inherit from `Node`.
20Comment.prototype = Object.create(Node.prototype);
21Comment.prototype.constructor = Comment;
22
23Comment.prototype.type = 'Comment';