added "for each k:v in .. do .." statement

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1174 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-08-27 13:06:24 +00:00
parent f510a35647
commit 9abfdd171c
7 changed files with 128 additions and 59 deletions
+3 -3
View File
@@ -128,17 +128,17 @@ class ScriptRangeIterator : public ScriptIterator {
public:
// Construct a range iterator with the given bounds (inclusive)
ScriptRangeIterator(int start, int end)
: pos(start), end(end) {}
: pos(start), start(start), end(end) {}
virtual ScriptValueP next(ScriptValueP* key_out) {
if (pos <= end) {
if (key_out) *key_out = to_script(pos);
if (key_out) *key_out = to_script(pos-start);
return to_script(pos++);
} else {
return ScriptValueP();
}
}
private:
int pos, end;
int pos, start, end;
};
ScriptValueP rangeIterator(int start, int end) {