Last change
on this file since 256 was
256,
checked in by hendrikvanantwerpen, 13 years ago
|
Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).
|
-
Property svn:executable set to
*
|
File size:
691 bytes
|
Line | |
---|
1 | (function (tree) { |
---|
2 | |
---|
3 | tree.Variable = function (name, index) { this.name = name, this.index = index }; |
---|
4 | tree.Variable.prototype = { |
---|
5 | eval: function (env) { |
---|
6 | var variable, v, name = this.name; |
---|
7 | |
---|
8 | if (name.indexOf('@@') == 0) { |
---|
9 | name = '@' + new(tree.Variable)(name.slice(1)).eval(env).value; |
---|
10 | } |
---|
11 | |
---|
12 | if (variable = tree.find(env.frames, function (frame) { |
---|
13 | if (v = frame.variable(name)) { |
---|
14 | return v.value.eval(env); |
---|
15 | } |
---|
16 | })) { return variable } |
---|
17 | else { |
---|
18 | throw { message: "variable " + name + " is undefined", |
---|
19 | index: this.index }; |
---|
20 | } |
---|
21 | } |
---|
22 | }; |
---|
23 | |
---|
24 | })(require('less/tree')); |
---|
Note: See
TracBrowser
for help on using the repository browser.