Пример #1
0
 public override void Visit(VariableDeclarationStatement node)
 {
   VisitNodes(node.Declarations);
   Visit((Statement)node);
 }
Пример #2
0
 public override void Visit(VariableDeclarationStatement node)
 {
   PushLocation(node);
   VisitNodes(node.Declarations);
   PopLocation();
 }
Пример #3
0
 private void AddVarDeclarationsForParams(BlockStatement body)
 {
   foreach (var p in _targetFuncMetadata.FunctionIR.Parameters)
   {
     var s = p.Symbol;
     Debug.Assert(s.IsParameter, "Invalid situation, symbol {0} in function {1} must be a Parameter", s.Name, _targetFuncMetadata.Declaration);
     var renamedSymbol = GetRenamedSymbolOf(s);
     WriteIdentifierExpression initialization = null;
     if (s.ParameterIndex < _call.Arguments.Count)
     {
       //TODO: in the following, we have not removed the user of the argument, so it will introduce a WriteTemporary. 
       initialization = new WriteIdentifierExpression(renamedSymbol, _call.Arguments[s.ParameterIndex]);
     }
     var declaration = new VariableDeclarationStatement(new List<VariableDeclaration>() { new VariableDeclaration(renamedSymbol, initialization) });
     body.Statements.Add(declaration);
   }
 }
Пример #4
0
 public override void Visit(VariableDeclarationStatement node) { }