3
tree.Expression = function (value) { this.value = value; };
4
tree.Expression.prototype = {
6
accept: function (visitor) {
7
this.value = visitor.visit(this.value);
11
inParenthesis = this.parens && !this.parensInOp,
16
if (this.value.length > 1) {
17
returnValue = new(tree.Expression)(this.value.map(function (e) {
20
} else if (this.value.length === 1) {
21
if (this.value[0].parens && !this.value[0].parensInOp) {
24
returnValue = this.value[0].eval(env);
29
env.outOfParenthesis();
31
if (this.parens && this.parensInOp && !(env.isMathsOn()) && !doubleParen) {
32
returnValue = new(tree.Paren)(returnValue);
36
toCSS: function (env) {
37
return this.value.map(function (e) {
38
return e.toCSS ? e.toCSS(env) : '';
41
throwAwayComments: function () {
42
this.value = this.value.filter(function(v) {
43
return !(v instanceof tree.Comment);
48
})(require('../tree'));