Differences From Artifact [6fa9c2c94c01b274]:
- File
polemy/value.d
- 2010-11-24 17:44:58 - part of checkin [b993a8ad16] on branch trunk - auto memo and re-run feature of non @value/@macro layers re-re-re-implemented. (user: kinaba) [annotate]
To Artifact [3d0cc7f551924493]:
- File
polemy/value.d
- 2010-11-26 05:03:10 - part of checkin [207cea338a] on branch trunk - changed hiding mechanizem of x in let x = ... for @macro layer. Old: set(x,ValueLayer,undefined) Nee: set(x,NoopLayer,null) (user: kinaba) [annotate]
101 101 return prototype.has(i, lay);
102 102 }
103 103
104 104 /// Return the value of index i at layer lay. Throws if it is not set
105 105 Value get(string i, Layer lay, LexPosition pos=null)
106 106 {
107 107 if( i in data ) {
108 - // [TODO] consider forwarding to proto also in this case
109 108 if( lay !in data[i] )
110 109 throw genex!RuntimeException(pos, sprintf!"'%s' is not set in %s layer"(i,lay));
111 110 return data[i][lay];
112 111 }
113 112 if( prototype is null )
114 113 throw genex!RuntimeException(pos, sprintf!"'%s' not found in %s layer"(i,lay));
115 114 return prototype.get(i, lay, pos);