/[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 3585 by schoenebeck, Fri Aug 30 17:51:24 2019 UTC revision 3592 by schoenebeck, Mon Sep 2 09:40:44 2019 UTC
# Line 810  assignment: Line 810  assignment:
810              PARSE_ERR(@3, (String("Array variable '") + name + "' accessed with non integer expression.").c_str());              PARSE_ERR(@3, (String("Array variable '") + name + "' accessed with non integer expression.").c_str());
811          else if ($3->asInt()->unitType())          else if ($3->asInt()->unitType())
812              PARSE_ERR(@3, "Unit types are not allowed as array index.");              PARSE_ERR(@3, "Unit types are not allowed as array index.");
813          else if ($6->exprType() != var->exprType())          else if ($6->exprType() != scalarTypeOfArray(var->exprType()))
814              PARSE_ERR(@5, (String("Variable '") + name + "' was declared as " + typeStr(var->exprType()) + ", assigned expression is " + typeStr($6->exprType()) + " though.").c_str());              PARSE_ERR(@5, (String("Variable '") + name + "' was declared as " + typeStr(var->exprType()) + ", assigned expression is " + typeStr($6->exprType()) + " though.").c_str());
815          else if ($6->asNumber()->unitType())          else if ($6->asNumber()->unitType())
816              PARSE_ERR(@6, "Unit types are not allowed for array variables.");              PARSE_ERR(@6, "Unit types are not allowed for array variables.");
# Line 906  unary_expr: Line 906  unary_expr:
906      | functioncall  {      | functioncall  {
907          $$ = $1;          $$ = $1;
908      }      }
909        | '+' unary_expr  {
910            $$ = $2;
911        }
912      | '-' unary_expr  {      | '-' unary_expr  {
913          $$ = new Neg($2);          $$ = new Neg($2);
914      }      }

Legend:
Removed from v.3585  
changed lines
  Added in v.3592

  ViewVC Help
Powered by ViewVC