示例#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) { }