Beispiel #1
0
        public void Visit(ReturnStatement statement)
        {
            returnInstance = null;

            if (statement.Expression != null) {
                statement.Expression.Accept(this);
                Return(Result);
            }

            exit = true;
        }
Beispiel #2
0
		public void Visit(ReturnStatement expression)
		{
			Builder.Append("return ");
			expression.Expression.Accept(this);
			Builder.AppendLine(";");
		}
Beispiel #3
0
 void Analyze(ReturnStatement Stmt)
 {
     SetCurrentLineAndCharNos(Stmt);
     if (Stmt.Expression != null)
     {
         int StatusIndex = JintStack.Count;
         Analyze(Stmt.Expression);
         if (JintStack.Count > StatusIndex)
         {
             List<JintItem> ReturnItems = RemoveJintStackFrom(StatusIndex);
             if (ReturnItems.Count > 0)
             {
                 ItemChecker IC = new ItemChecker(this);
                 TaintResult ReturnResult = IC.Check(ReturnItems);
                 if (ReturnResult.SourceTaint)
                     AddSourceLine(ReturnItems[0].LineNo, ReturnResult.SourceReasons);
                 if (ReturnResult.SinkTaint)
                     AddSinkLine(ReturnItems[0].LineNo, ReturnResult.SinkReasons);
             }
         }
     }
 }