fix shellmode calls with more than one parameter 14/15414/1
Antoine ELIAS [Fri, 24 Oct 2014 09:09:40 +0000 (11:09 +0200)]
Change-Id: I8abfb8271aba9bb2eed51e76245a57079e1512d2

scilab/modules/ast/includes/exps/callexp.hxx
scilab/modules/ast/src/cpp/parse/bison/parsescilab.yy
scilab/modules/ast/src/cpp/parse/parsescilab.cpp

index b09063c..ed5766e 100644 (file)
@@ -112,6 +112,11 @@ public:
         return *args;
     }
 
+    void addArg(ast::Exp* exp)
+    {
+        _exps.push_back(exp);
+    }
+
     virtual ExpType getType()
     {
         return CALLEXP;
index fe6b9db..28b766f 100644 (file)
@@ -460,7 +460,7 @@ functionDeclaration                         { $$ = $1; }
 implicitFunctionCall :
 /* FIXME : Add arguments to call */
 implicitFunctionCall implicitCallable          {
-                                                 $1->getArgs().push_back($2);
+                                                 $1->addArg($2);
                                                  $1->setLocation(@$);
                           $$ = $1;
                                                }
index 210101f..93c4d1a 100644 (file)
@@ -2966,7 +2966,7 @@ yyreduce:
   case 36:
 
     {
-                                                 (yyvsp[-1].t_call_exp)->getArgs().push_back((yyvsp[0].t_string_exp));
+                                                 (yyvsp[-1].t_call_exp)->addArg((yyvsp[0].t_string_exp));
                                                  (yyvsp[-1].t_call_exp)->setLocation((yyloc));
                           (yyval.t_call_exp) = (yyvsp[-1].t_call_exp);
                                                }