From a72966fa6abae92b7af2cf96d49b37ab94469747 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Sat, 19 Jun 2010 01:51:26 -0400 Subject: [PATCH] removed constructor names --- lib/less/tree/alpha.js | 2 +- lib/less/tree/anonymous.js | 2 +- lib/less/tree/call.js | 2 +- lib/less/tree/color.js | 2 +- lib/less/tree/comment.js | 2 +- lib/less/tree/dimension.js | 2 +- lib/less/tree/directive.js | 2 +- lib/less/tree/element.js | 4 ++-- lib/less/tree/expression.js | 2 +- lib/less/tree/import.js | 2 +- lib/less/tree/keyword.js | 2 +- lib/less/tree/mixin.js | 4 ++-- lib/less/tree/operation.js | 2 +- lib/less/tree/quoted.js | 5 ++--- lib/less/tree/rule.js | 4 ++-- lib/less/tree/ruleset.js | 2 +- lib/less/tree/selector.js | 2 +- lib/less/tree/url.js | 2 +- lib/less/tree/value.js | 2 +- lib/less/tree/variable.js | 2 +- 20 files changed, 24 insertions(+), 25 deletions(-) diff --git a/lib/less/tree/alpha.js b/lib/less/tree/alpha.js index b6ffa4a4..f9a5c98a 100644 --- a/lib/less/tree/alpha.js +++ b/lib/less/tree/alpha.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Alpha = function Alpha(val) { +tree.Alpha = function (val) { this.value = val; }; tree.Alpha.prototype = { diff --git a/lib/less/tree/anonymous.js b/lib/less/tree/anonymous.js index 8b6841ab..e5c24032 100644 --- a/lib/less/tree/anonymous.js +++ b/lib/less/tree/anonymous.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Anonymous = function Anonymous(string) { +tree.Anonymous = function (string) { this.value = string.content || string; }; tree.Anonymous.prototype = { diff --git a/lib/less/tree/call.js b/lib/less/tree/call.js index 2d9d4af9..c2353e54 100644 --- a/lib/less/tree/call.js +++ b/lib/less/tree/call.js @@ -3,7 +3,7 @@ // // A function call node. // -tree.Call = function Call(name, args) { +tree.Call = function (name, args) { this.name = name; this.args = args; }; diff --git a/lib/less/tree/color.js b/lib/less/tree/color.js index f27088d0..32d71310 100644 --- a/lib/less/tree/color.js +++ b/lib/less/tree/color.js @@ -2,7 +2,7 @@ // // RGB Colors - #ff0014, #eee // -tree.Color = function Color(rgb, a) { +tree.Color = function (rgb, a) { // // The end goal here, is to parse the arguments // into an integer triplet, such as `128, 255, 0` diff --git a/lib/less/tree/comment.js b/lib/less/tree/comment.js index ef6f4469..2d95dff8 100644 --- a/lib/less/tree/comment.js +++ b/lib/less/tree/comment.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Comment = function Comment(value, silent) { +tree.Comment = function (value, silent) { this.value = value; this.silent = !!silent; }; diff --git a/lib/less/tree/dimension.js b/lib/less/tree/dimension.js index 487fdd98..41f3ca2c 100644 --- a/lib/less/tree/dimension.js +++ b/lib/less/tree/dimension.js @@ -3,7 +3,7 @@ // // A number with a unit // -tree.Dimension = function Dimension(value, unit) { +tree.Dimension = function (value, unit) { this.value = parseFloat(value); this.unit = unit || null; }; diff --git a/lib/less/tree/directive.js b/lib/less/tree/directive.js index 4b28fcb4..79779c03 100644 --- a/lib/less/tree/directive.js +++ b/lib/less/tree/directive.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Directive = function Directive(name, value) { +tree.Directive = function (name, value) { this.name = name; if (Array.isArray(value)) { this.ruleset = new(tree.Ruleset)([], value); diff --git a/lib/less/tree/element.js b/lib/less/tree/element.js index d245a128..acf5e205 100644 --- a/lib/less/tree/element.js +++ b/lib/less/tree/element.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Element = function Element(combinator, value) { +tree.Element = function (combinator, value) { this.combinator = combinator instanceof tree.Combinator ? combinator : new(tree.Combinator)(combinator); this.value = value.trim(); @@ -9,7 +9,7 @@ tree.Element.prototype.toCSS = function (env) { return this.combinator.toCSS(env || {}) + this.value; }; -tree.Combinator = function Combinator(value) { +tree.Combinator = function (value) { if (value === ' ') { this.value = ' '; } else { diff --git a/lib/less/tree/expression.js b/lib/less/tree/expression.js index 2f7fe401..a356c242 100644 --- a/lib/less/tree/expression.js +++ b/lib/less/tree/expression.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Expression = function Expression(value) { this.value = value }; +tree.Expression = function (value) { this.value = value }; tree.Expression.prototype = { eval: function (env) { if (this.value.length > 1) { diff --git a/lib/less/tree/import.js b/lib/less/tree/import.js index 0e790bcf..4df1e3c7 100644 --- a/lib/less/tree/import.js +++ b/lib/less/tree/import.js @@ -11,7 +11,7 @@ // `import,push`, we also pass it a callback, which it'll call once // the file has been fetched, and parsed. // -tree.Import = function Import(path, imports) { +tree.Import = function (path, imports) { var that = this; this._path = path; diff --git a/lib/less/tree/keyword.js b/lib/less/tree/keyword.js index 77b3597f..a4431ba3 100644 --- a/lib/less/tree/keyword.js +++ b/lib/less/tree/keyword.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Keyword = function Keyword(value) { this.value = value }; +tree.Keyword = function (value) { this.value = value }; tree.Keyword.prototype = { eval: function () { return this }, toCSS: function () { return this.value } diff --git a/lib/less/tree/mixin.js b/lib/less/tree/mixin.js index f500e703..ecc6c161 100644 --- a/lib/less/tree/mixin.js +++ b/lib/less/tree/mixin.js @@ -1,7 +1,7 @@ (function (tree) { tree.mixin = {}; -tree.mixin.Call = function MixinCall(elements, args, index) { +tree.mixin.Call = function (elements, args, index) { this.selector = new(tree.Selector)(elements); this.arguments = args; this.index = index; @@ -40,7 +40,7 @@ tree.mixin.Call.prototype = { } }; -tree.mixin.Definition = function MixinDefinition(name, params, rules) { +tree.mixin.Definition = function (name, params, rules) { this.name = name; this.selectors = [new(tree.Selector)([new(tree.Element)(null, name)])]; this.params = params; diff --git a/lib/less/tree/operation.js b/lib/less/tree/operation.js index 3a5bac56..d2e4d578 100644 --- a/lib/less/tree/operation.js +++ b/lib/less/tree/operation.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Operation = function Operation(op, operands) { +tree.Operation = function (op, operands) { this.op = op.trim(); this.operands = operands; }; diff --git a/lib/less/tree/quoted.js b/lib/less/tree/quoted.js index c08ad503..f415da09 100644 --- a/lib/less/tree/quoted.js +++ b/lib/less/tree/quoted.js @@ -1,13 +1,12 @@ (function (tree) { -tree.Quoted = function Quoted(value, content) { +tree.Quoted = function (value, content) { this.value = value; this.content = content; }; tree.Quoted.prototype = { toCSS: function () { - var css = this.value; - return css; + return this.value; }, eval: function () { return this; diff --git a/lib/less/tree/rule.js b/lib/less/tree/rule.js index d8f4887b..9b9f6b93 100644 --- a/lib/less/tree/rule.js +++ b/lib/less/tree/rule.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Rule = function Rule(name, value, index) { +tree.Rule = function (name, value, index) { this.name = name; this.value = (value instanceof tree.Value) ? value : new(tree.Value)([value]); this.index = index; @@ -20,7 +20,7 @@ tree.Rule.prototype.eval = function (context) { return new(tree.Rule)(this.name, this.value.eval(context)); }; -tree.Shorthand = function Shorthand(a, b) { +tree.Shorthand = function (a, b) { this.a = a; this.b = b; }; diff --git a/lib/less/tree/ruleset.js b/lib/less/tree/ruleset.js index c543f41f..51323e5a 100644 --- a/lib/less/tree/ruleset.js +++ b/lib/less/tree/ruleset.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Ruleset = function Ruleset(selectors, rules) { +tree.Ruleset = function (selectors, rules) { this.selectors = selectors; this.rules = rules; this._lookups = {}; diff --git a/lib/less/tree/selector.js b/lib/less/tree/selector.js index c92c9fe3..eaaa0423 100644 --- a/lib/less/tree/selector.js +++ b/lib/less/tree/selector.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Selector = function Selector(elements) { +tree.Selector = function (elements) { this.elements = elements; if (this.elements[0].combinator.value === "") { this.elements[0].combinator.value = ' '; diff --git a/lib/less/tree/url.js b/lib/less/tree/url.js index 1fec6560..6ad97dc6 100644 --- a/lib/less/tree/url.js +++ b/lib/less/tree/url.js @@ -1,6 +1,6 @@ (function (tree) { -tree.URL = function URL(val) { +tree.URL = function (val) { this.value = val; }; tree.URL.prototype = { diff --git a/lib/less/tree/value.js b/lib/less/tree/value.js index 3a2a90f8..922096cd 100644 --- a/lib/less/tree/value.js +++ b/lib/less/tree/value.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Value = function Value(value) { +tree.Value = function (value) { this.value = value; this.is = 'value'; }; diff --git a/lib/less/tree/variable.js b/lib/less/tree/variable.js index 633ecdb6..010761db 100644 --- a/lib/less/tree/variable.js +++ b/lib/less/tree/variable.js @@ -1,6 +1,6 @@ (function (tree) { -tree.Variable = function Variable(name, index) { this.name = name, this.index = index }; +tree.Variable = function (name, index) { this.name = name, this.index = index }; tree.Variable.prototype = { eval: function (env) { var variable, v, name = this.name;