From 3fa7b2fcc09bef4e36a89450598d4a86e893909b Mon Sep 17 00:00:00 2001 From: Alexis Sellier Date: Sat, 17 Dec 2011 17:42:34 +0100 Subject: [PATCH] parenthesized node init --- lib/less/tree/paren.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/less/tree/paren.js diff --git a/lib/less/tree/paren.js b/lib/less/tree/paren.js new file mode 100644 index 00000000..384a43c7 --- /dev/null +++ b/lib/less/tree/paren.js @@ -0,0 +1,16 @@ + +(function (tree) { + +tree.Paren = function (node) { + this.value = node; +}; +tree.Paren.prototype = { + toCSS: function (env) { + return '(' + this.value.toCSS(env) + ')'; + }, + eval: function (env) { + return new(tree.Paren)(this.value.eval(env)); + } +}; + +})(require('../tree'));