/[svn]/linuxsampler/trunk/src/scriptvm/parser.y
ViewVC logotype

Diff of /linuxsampler/trunk/src/scriptvm/parser.y

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

revision 2935 by schoenebeck, Sun Jul 10 14:24:13 2016 UTC revision 2945 by schoenebeck, Thu Jul 14 00:22:26 2016 UTC
# Line 357  functioncall: Line 357  functioncall:
357                      PARSE_ERR(@3, (String("Argument ") + ToString(i+1) + " of built-in function '" + name + "' expects " + typeStr(fn->argType(i)) + " type, but type " + typeStr(args->arg(i)->exprType()) + " was given instead.").c_str());                      PARSE_ERR(@3, (String("Argument ") + ToString(i+1) + " of built-in function '" + name + "' expects " + typeStr(fn->argType(i)) + " type, but type " + typeStr(args->arg(i)->exprType()) + " was given instead.").c_str());
358                      argsOK = false;                      argsOK = false;
359                      break;                      break;
360                    } else if (fn->modifiesArg(i) && !args->arg(i)->isModifyable()) {
361                        PARSE_ERR(@3, (String("Argument ") + ToString(i+1) + " of built-in function '" + name + "' expects an assignable variable.").c_str());
362                        argsOK = false;
363                        break;
364                  }                  }
365              }              }
366              $$ = new FunctionCall(name, args, argsOK ? fn : NULL);              $$ = new FunctionCall(name, args, argsOK ? fn : NULL);
# Line 415  assignment: Line 419  assignment:
419              PARSE_ERR(@1, (String("Variable assignment: No variable declared with name '") + name + "'.").c_str());              PARSE_ERR(@1, (String("Variable assignment: No variable declared with name '") + name + "'.").c_str());
420          else if (var->isConstExpr())          else if (var->isConstExpr())
421              PARSE_ERR(@2, (String("Variable assignment: Cannot modify const variable '") + name + "'.").c_str());              PARSE_ERR(@2, (String("Variable assignment: Cannot modify const variable '") + name + "'.").c_str());
422            else if (!var->isAssignable())
423                PARSE_ERR(@2, (String("Variable assignment: Variable '") + name + "' is not assignable.").c_str());
424          else if (var->exprType() != $3->exprType())          else if (var->exprType() != $3->exprType())
425              PARSE_ERR(@3, (String("Variable assignment: Variable '") + name + "' is of type " + typeStr(var->exprType()) + ", assignment is of type " + typeStr($3->exprType()) + " though.").c_str());              PARSE_ERR(@3, (String("Variable assignment: Variable '") + name + "' is of type " + typeStr(var->exprType()) + ", assignment is of type " + typeStr($3->exprType()) + " though.").c_str());
426          $$ = new Assignment(var, $3);          $$ = new Assignment(var, $3);

Legend:
Removed from v.2935  
changed lines
  Added in v.2945

  ViewVC Help
Powered by ViewVC