/[svn]/linuxsampler/trunk/src/scriptvm/tree.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/tree.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3034 by schoenebeck, Mon Oct 31 00:05:00 2016 UTC revision 3056 by schoenebeck, Fri Dec 16 12:57:59 2016 UTC
# Line 35  String IntExpr::evalCastToStr() { Line 35  String IntExpr::evalCastToStr() {
35      return ToString(evalInt());      return ToString(evalInt());
36  }  }
37    
38    /*String IntArrayExpr::evalCastToStr() {
39        String s = "{";
40        for (int i = 0; i < arraySize(); ++i) {
41            int val = evalIntElement(i);
42            if (i) s += ",";
43            s += ToString(val);
44        }
45        s += "}";
46        return s;
47    }*/
48    
49  int IntLiteral::evalInt() {  int IntLiteral::evalInt() {
50      return value;      return value;
51  }  }
# Line 313  int FunctionCall::evalInt() { Line 324  int FunctionCall::evalInt() {
324      return intExpr->evalInt();      return intExpr->evalInt();
325  }  }
326    
327    VMIntArrayExpr* FunctionCall::asIntArray() const {
328        VMFnResult* result = const_cast<FunctionCall*>(this)->execVMFn();
329        if (!result) return 0;
330        VMIntArrayExpr* intArrExpr = dynamic_cast<VMIntArrayExpr*>(result->resultValue());
331        return intArrExpr;
332    }
333    
334  String FunctionCall::evalStr() {  String FunctionCall::evalStr() {
335      VMFnResult* result = execVMFn();      VMFnResult* result = execVMFn();
336      if (!result) return "";      if (!result) return "";

Legend:
Removed from v.3034  
changed lines
  Added in v.3056

  ViewVC Help
Powered by ViewVC