• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Ast.LocalVariableDeclaration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ICSharpCode.NRefactory.Ast.LocalVariableDeclaration的典型用法代码示例。如果您正苦于以下问题:C# LocalVariableDeclaration类的具体用法?C# LocalVariableDeclaration怎么用?C# LocalVariableDeclaration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LocalVariableDeclaration类属于ICSharpCode.NRefactory.Ast命名空间,在下文中一共展示了LocalVariableDeclaration类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: add_Variable

 public static VariableDeclaration add_Variable(this BlockStatement blockDeclaration, string name, Expression expression, TypeReference typeReference)
 {
     var variableDeclaration = new VariableDeclaration(name, expression) {TypeReference = typeReference};
     var localVariableDeclaration = new LocalVariableDeclaration(variableDeclaration);
     blockDeclaration.append(localVariableDeclaration);
     return variableDeclaration;
 }
开发者ID:SiGhTfOrbACQ,项目名称:O2.Platform.Projects,代码行数:7,代码来源:VariableDeclaration_ExtensionMethods.cs


示例2: VisitLocalVariableDeclaration

            public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
            {
                if (localVariableDeclaration.TypeReference.IsArrayType)
                {
                    if (localVariableDeclaration.Variables.Count > 0)
                    {
                        var decl = localVariableDeclaration.Variables[0] as VariableDeclaration;
                        if (decl != null)
                        {
                            if (decl.Initializer is CollectionInitializerExpression)
                            {
                                UnlockWith(localVariableDeclaration);
                            }
                            else if (decl.Initializer is ArrayCreateExpression)
                            {
                                ArrayCreateExpression decl2 = decl.Initializer as ArrayCreateExpression;
                                if (decl2.ArrayInitializer is CollectionInitializerExpression && decl2.ArrayInitializer.CreateExpressions.Count > 0)
                                {
                                    UnlockWith(decl2.ArrayInitializer);
                                }
                            }
                        }
                    }
                }

                return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
            }
开发者ID:timdams,项目名称:strokes,代码行数:27,代码来源:ArrayDeclarateInitAchievement.cs


示例3: VisitLocalVariableDeclaration

 public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
 {
     base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
     if ((localVariableDeclaration.Modifier & Modifiers.Static) == Modifiers.Static) {
         INode parent = localVariableDeclaration.Parent;
         while (parent != null && !IsTypeLevel(parent)) {
             parent = parent.Parent;
         }
         if (parent != null) {
             INode type = parent.Parent;
             if (type != null) {
                 int pos = type.Children.IndexOf(parent);
                 if (pos >= 0) {
                     FieldDeclaration field = new FieldDeclaration(null);
                     field.TypeReference = localVariableDeclaration.TypeReference;
                     field.Modifier = Modifiers.Static;
                     field.Fields = localVariableDeclaration.Variables;
                     new PrefixFieldsVisitor(field.Fields, "static_" + GetTypeLevelEntityName(parent) + "_").Run(parent);
                     type.Children.Insert(pos + 1, field);
                     RemoveCurrentNode();
                 }
             }
         }
     }
     return null;
 }
开发者ID:almazik,项目名称:ILSpy,代码行数:26,代码来源:ToCSharpConvertVisitor.cs


示例4: VisitLocalVariableDeclaration

            public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
            {
                //Tim= not so happy about hardocing this RankSpecifier, not sure when this specifier contains more than 1 element
                if (localVariableDeclaration.TypeReference.IsArrayType && localVariableDeclaration.TypeReference.RankSpecifier[0]>=1)
                    UnlockWith(localVariableDeclaration);

                return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
            }
开发者ID:timdams,项目名称:strokes,代码行数:8,代码来源:MultipleDimensionArrayDeclarationAchievement.cs


示例5: VisitLocalVariableDeclaration

 public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
 {
     if ((localVariableDeclaration.Modifier & Modifiers.Const) == Modifiers.Const)
     {
         UnlockWith(localVariableDeclaration);
     }
     return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
 }
开发者ID:timdams,项目名称:strokes,代码行数:8,代码来源:ConstKeywordAchievement.cs


示例6: VisitLocalVariableDeclaration

            public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
            {
                if (localVariableDeclaration.TypeReference.ToString().Equals("Thread") ||
                    localVariableDeclaration.TypeReference.ToString().Equals("Threading.Thread"))
                {
                    UnlockWith(localVariableDeclaration);
                }

                return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
            }
开发者ID:timdams,项目名称:strokes,代码行数:10,代码来源:CreateThreadAchievement.cs


示例7: VisitLocalVariableDeclaration

 public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
 {
     foreach (var vd in localVariableDeclaration.Variables)
     {
         if (RenameTable.ContainsKey(vd.Name))
         {
             vd.Name = RenameTable[vd.Name];
         }
     }
     return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
 }
开发者ID:Adam-Fogle,项目名称:agentralphplugin,代码行数:11,代码来源:RenameLocalVariableRefactoring.cs


示例8: GetVariableNameFromVariableDeclaration

		string GetVariableNameFromVariableDeclaration(LocalVariableDeclaration declaration)
		{
			if (declaration == null)
				return null;
			if (declaration.Variables.Count != 1)
				return null;
			VariableDeclaration varDecl = declaration.Variables[0];
			if (!varDecl.Initializer.IsNull &&
			    // don't offer action for "var a = new Foo()"
			    !(varDecl.Initializer is ObjectCreateExpression))
				return varDecl.Name;
			return null;
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:13,代码来源:CheckAssignmentCache.cs


示例9: VisitLocalVariableDeclaration

 public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration,
                                                      object data)
 {
     if (localVariableDeclaration.TypeReference.Type.Contains("System.Double")
         || localVariableDeclaration.TypeReference.Type.Contains("System.Float")
         || localVariableDeclaration.TypeReference.Type.Contains("System.Decimal"))
     {
         foreach (VariableDeclaration variableDeclaration in localVariableDeclaration.Variables)
         {
             _doublefloatvariables.Add(variableDeclaration.Name);
         }
     }
     return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
 }
开发者ID:timdams,项目名称:strokes,代码行数:14,代码来源:DangerousEqualityCheckAchievement.cs


示例10: VisitLocalVariableDeclaration

            public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
            {
                if (localVariableDeclaration.TypeReference.Type.Equals("Thread") ||
                    localVariableDeclaration.TypeReference.Type.Equals("Threading.Thread") ||
                    localVariableDeclaration.TypeReference.Type.Equals("System.Threading.Thread"))
                {
                    foreach (VariableDeclaration variableDeclaration in localVariableDeclaration.Variables)
                    {
                        threadVars.Add(variableDeclaration.Name);
                    }
                }

                return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
            }
开发者ID:timdams,项目名称:strokes,代码行数:14,代码来源:ThreadMethodschievements.cs


示例11: TrackedVisitArrayCreateExpression

        public override object TrackedVisitArrayCreateExpression(ArrayCreateExpression arrayCreateExpression, object data)
        {
            string variableName = GetVariableName(arrayCreateExpression);
            List<Expression> initializerList = arrayCreateExpression.ArrayInitializer.CreateExpressions;
            Expression replacedExpression = arrayCreateExpression;
            if (initializerList.Count > 0 && initializerList[0] is CollectionInitializerExpression && data is InsertionBlockData)
            {
                ArrayCreateExpression replacedArrayCreateExpression = arrayCreateExpression;
                replacedArrayCreateExpression.ArrayInitializer = null;
                replacedArrayCreateExpression.Arguments.Add(new PrimitiveExpression(initializerList.Count, initializerList.Count.ToString()));

                string arrayTypeName = arrayCreateExpression.CreateType.Type + "s";
                Position position = Position.After;
                if (variableName == null)
                {
                    variableName = arrayTypeName;
                    position = Position.Before;
                }

                List<Statement> initStatements = GetArrayInitStatements(replacedArrayCreateExpression, variableName, initializerList);
                InsertionBlockData insertionBlockData = (InsertionBlockData) data;
                insertionBlockData.Block = (BlockStatement) AstUtil.GetParentOfType(replacedArrayCreateExpression, typeof(BlockStatement));
                insertionBlockData.BlockChildIndex = GetBlockChildIndex(replacedArrayCreateExpression, position);
                insertionBlockData.Statements = initStatements;

                if (variableName == arrayTypeName)
                {
                    IdentifierExpression identifierExpression = new IdentifierExpression(variableName);
                    replacedExpression = identifierExpression;

                    VariableDeclaration variableDeclaration = new VariableDeclaration(variableName, arrayCreateExpression);
                    LocalVariableDeclaration localVariable = new LocalVariableDeclaration(variableDeclaration);
                    localVariable.TypeReference = arrayCreateExpression.CreateType;

                    initStatements.Insert(0, localVariable);
                }

                ReplaceCurrentNode(replacedExpression);
            }

            return base.TrackedVisitArrayCreateExpression(arrayCreateExpression, data);
        }
开发者ID:sourcewarehouse,项目名称:janett,代码行数:42,代码来源:ArrayInitializerTransformer.cs


示例12: VisitLocalVariableDeclaration

		public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
		{
			if (localVariableDeclaration.TypeReference.Type == "var")
				localVariableDeclaration.TypeReference = TypeReference.Null;
			return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:6,代码来源:ToVBNetConvertVisitor.cs


示例13: VisitLocalVariableDeclaration

 public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
 {
     localVariableDeclarations.Add(localVariableDeclaration);
     return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
 }
开发者ID:pusp,项目名称:o2platform,代码行数:5,代码来源:AstVisitors.cs


示例14: VisitLocalVariableDeclaration

 public override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
 {
     if (this.CheckNode(localVariableDeclaration)) {
         return null;
     }
     return base.VisitLocalVariableDeclaration(localVariableDeclaration, data);
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:MemberFindAstVisitor.cs


示例15: PerformChanges

		public override List<Change> PerformChanges (RefactoringOptions options, object prop)
		{
			List<Change> result = new List<Change> ();
			ExtractMethodParameters param = (ExtractMethodParameters)prop;
			TextEditorData data = options.GetTextEditorData ();
			INRefactoryASTProvider provider = options.GetASTProvider ();
			IResolver resolver = options.GetResolver ();
			ICSharpCode.NRefactory.Ast.INode node = Analyze (options, param, false);
			if (param.VariablesToGenerate.Count > 0) {
				TextReplaceChange varGen = new TextReplaceChange ();
				varGen.Description = GettextCatalog.GetString ("Generate some temporary variables");
				varGen.FileName = options.Document.FileName;
				LineSegment line = data.Document.GetLine (Math.Max (0, data.Document.OffsetToLineNumber (data.SelectionRange.Offset) - 1));
				varGen.Offset = line.Offset + line.EditableLength;
				varGen.InsertedText = Environment.NewLine + options.GetWhitespaces (line.Offset);
				foreach (VariableDescriptor var in param.VariablesToGenerate) {
					TypeReference tr = options.ShortenTypeName (var.ReturnType).ConvertToTypeReference ();
					varGen.InsertedText += provider.OutputNode (options.Dom, new LocalVariableDeclaration (new VariableDeclaration (var.Name, null, tr))).Trim ();
				}
				result.Add (varGen);
			}
			InvocationExpression invocation = new InvocationExpression (new IdentifierExpression (param.Name));
			foreach (VariableDescriptor var in param.Parameters) {
				if (!param.OneChangedVariable && param.ChangedVariables.Contains (var.Name)) {
					FieldDirection fieldDirection = FieldDirection.Ref;
					VariableDescriptor outsideVar = null;
					if (param.VariablesOutside.TryGetValue (var.Name, out outsideVar) && (var.GetsAssigned || param.VariablesToGenerate.Where (v => v.Name == var.Name).Any ())) {
						if (!outsideVar.GetsAssigned)
							fieldDirection = FieldDirection.Out;
					}
					invocation.Arguments.Add (new DirectionExpression (fieldDirection, new IdentifierExpression (var.Name)));
				} else {
					invocation.Arguments.Add (new IdentifierExpression (var.Name));
				}
			}
			//	string mimeType = DesktopService.GetMimeTypeForUri (options.Document.FileName);
			TypeReference returnType = new TypeReference ("System.Void", true);
			ICSharpCode.NRefactory.Ast.INode outputNode;
			if (param.OneChangedVariable) {
				string name = param.ChangedVariables.First ();
				returnType = options.ShortenTypeName (param.Variables.Find (v => v.Name == name).ReturnType).ConvertToTypeReference ();
				if (param.OutsideVariableList.Any (v => v.Name == name && !v.IsDefined)) {
					LocalVariableDeclaration varDecl = new LocalVariableDeclaration (returnType);
					varDecl.Variables.Add (new VariableDeclaration (name, invocation));
					outputNode = varDecl;
				} else {
					outputNode = new ExpressionStatement (new AssignmentExpression (new IdentifierExpression (name), ICSharpCode.NRefactory.Ast.AssignmentOperatorType.Assign, invocation));
				}
			} else {
				outputNode = node is BlockStatement ? (ICSharpCode.NRefactory.Ast.INode)new ExpressionStatement (invocation) : invocation;
			}
			TextReplaceChange replacement = new TextReplaceChange ();
			replacement.Description = string.Format (GettextCatalog.GetString ("Substitute selected statement(s) with call to {0}"), param.Name);
			replacement.FileName = options.Document.FileName;
			replacement.Offset = options.Document.Editor.SelectionRange.Offset;
			replacement.RemovedChars = options.Document.Editor.SelectionRange.Length;
			replacement.MoveCaretToReplace = true;
			
			LineSegment line1 = data.Document.GetLineByOffset (options.Document.Editor.SelectionRange.EndOffset);
			if (options.Document.Editor.SelectionRange.EndOffset == line1.Offset) {
				if (line1.Offset > 0) {
					LineSegment line2 = data.Document.GetLineByOffset (line1.Offset - 1);
					replacement.RemovedChars -= line2.DelimiterLength;
				}
			}
			
			replacement.InsertedText = options.GetWhitespaces (options.Document.Editor.SelectionRange.Offset) + provider.OutputNode (options.Dom, outputNode).Trim ();
			
			result.Add (replacement);

			TextReplaceChange insertNewMethod = new TextReplaceChange ();
			insertNewMethod.FileName = options.Document.FileName;
			insertNewMethod.Description = string.Format (GettextCatalog.GetString ("Create new method {0} from selected statement(s)"), param.Name);
			insertNewMethod.RemovedChars = param.InsertionPoint.LineBefore == NewLineInsertion.Eol ? 0 : param.InsertionPoint.Location.Column;
			insertNewMethod.Offset = data.Document.LocationToOffset (param.InsertionPoint.Location) - insertNewMethod.RemovedChars;
			
			ExtractMethodAstTransformer transformer = new ExtractMethodAstTransformer (param.VariablesToGenerate);
			node.AcceptVisitor (transformer, null);
			if (!param.OneChangedVariable && node is Expression) {
				ResolveResult resolveResult = resolver.Resolve (new ExpressionResult ("(" + provider.OutputNode (options.Dom, node) + ")"), new DomLocation (options.Document.Editor.Caret.Line, options.Document.Editor.Caret.Column));
				if (resolveResult.ResolvedType != null)
					returnType = options.ShortenTypeName (resolveResult.ResolvedType).ConvertToTypeReference ();
			}
			
			MethodDeclaration methodDecl = new MethodDeclaration ();
			methodDecl.Name = param.Name;
			methodDecl.Modifier = param.Modifiers;
			methodDecl.TypeReference = returnType;
			
			if (!param.ReferencesMember)
				methodDecl.Modifier |= ICSharpCode.NRefactory.Ast.Modifiers.Static;
			if (node is BlockStatement) {
				methodDecl.Body = new BlockStatement ();
				methodDecl.Body.AddChild (new EmptyStatement ());
				if (param.OneChangedVariable)
					methodDecl.Body.AddChild (new ReturnStatement (new IdentifierExpression (param.ChangedVariables.First ())));
			} else if (node is Expression) {
				methodDecl.Body = new BlockStatement ();
				methodDecl.Body.AddChild (new ReturnStatement (node as Expression));
			}
//.........这里部分代码省略.........
开发者ID:pgoron,项目名称:monodevelop,代码行数:101,代码来源:ExtractMethodRefactoring.cs


示例16: EmbeddedStatement


//.........这里部分代码省略.........
			AssignmentOperatorType op;
			Location startLoc = la.Location;
			
			bool mustBeAssignment = la.kind == Tokens.Plus  || la.kind == Tokens.Minus ||
			                        la.kind == Tokens.Not   || la.kind == Tokens.Times;
			
			SimpleExpr(
//#line  3330 "VBNET.ATG" 
out expr);
			if (StartOf(46)) {
				AssignmentOperator(
//#line  3332 "VBNET.ATG" 
out op);
				Expr(
//#line  3332 "VBNET.ATG" 
out val);

//#line  3334 "VBNET.ATG" 
				expr = new AssignmentExpression(expr, op, val);
				expr.StartLocation = startLoc;
				expr.EndLocation = t.EndLocation;
				
			} else if (StartOf(47)) {

//#line  3338 "VBNET.ATG" 
				if (mustBeAssignment) Error("error in assignment."); 
			} else SynErr(302);

//#line  3341 "VBNET.ATG" 
			// a field reference expression that stands alone is a
			// invocation expression without parantheses and arguments
			if(expr is MemberReferenceExpression || expr is IdentifierExpression) {
				Location endLocation = expr.EndLocation;
				expr = new InvocationExpression(expr);
				expr.StartLocation = startLoc;
				expr.EndLocation = endLocation;
			}
			statement = new ExpressionStatement(expr);
			
		} else if (la.kind == 73) {
			lexer.NextToken();
			SimpleExpr(
//#line  3351 "VBNET.ATG" 
out expr);

//#line  3351 "VBNET.ATG" 
			statement = new ExpressionStatement(expr); 
		} else if (la.kind == 226) {
			lexer.NextToken();

//#line  3353 "VBNET.ATG" 
			Statement block;  
			if (
//#line  3354 "VBNET.ATG" 
Peek(1).kind == Tokens.As) {

//#line  3355 "VBNET.ATG" 
				LocalVariableDeclaration resourceAquisition = new LocalVariableDeclaration(Modifiers.None); 
				VariableDeclarator(
//#line  3356 "VBNET.ATG" 
resourceAquisition.Variables);
				while (la.kind == 22) {
					lexer.NextToken();
					VariableDeclarator(
//#line  3358 "VBNET.ATG" 
resourceAquisition.Variables);
				}
				Block(
//#line  3360 "VBNET.ATG" 
out block);

//#line  3362 "VBNET.ATG" 
				statement = new UsingStatement(resourceAquisition, block);
				
			} else if (StartOf(24)) {
				Expr(
//#line  3364 "VBNET.ATG" 
out expr);
				Block(
//#line  3365 "VBNET.ATG" 
out block);

//#line  3366 "VBNET.ATG" 
				statement = new UsingStatement(new ExpressionStatement(expr), block); 
			} else SynErr(303);
			Expect(113);
			Expect(226);
		} else if (StartOf(48)) {
			LocalDeclarationStatement(
//#line  3369 "VBNET.ATG" 
out statement);
		} else SynErr(304);

//#line  3372 "VBNET.ATG" 
		if (statement != null) {
		statement.StartLocation = startLocation;
		statement.EndLocation = t.EndLocation;
		}
		
	}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:101,代码来源:Parser.cs


示例17: VisitLocalVariableDeclaration

		public sealed override object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data) {
			this.BeginVisit(localVariableDeclaration);
			object result = this.TrackedVisitLocalVariableDeclaration(localVariableDeclaration, data);
			this.EndVisit(localVariableDeclaration);
			return result;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:6,代码来源:NodeTrackingAstVisitor.cs


示例18: VisitLocalVariableDeclaration

		public virtual object VisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data) {
			throw new global::System.NotImplementedException("LocalVariableDeclaration");
		}
开发者ID:Altaxo,项目名称:Altaxo,代码行数:3,代码来源:NotImplementedAstVisitor.cs


示例19: EmbeddedStatement


//.........这里部分代码省略.........
		} else if (la.kind == 179) {

#line  3003 "VBNET.ATG" 
			ResumeStatement resumeStatement = null; 
			ResumeStatement(
#line  3004 "VBNET.ATG" 
out resumeStatement);

#line  3004 "VBNET.ATG" 
			statement = resumeStatement; 
		} else if (StartOf(38)) {

#line  3007 "VBNET.ATG" 
			Expression val = null;
			AssignmentOperatorType op;
			
			bool mustBeAssignment = la.kind == Tokens.Plus  || la.kind == Tokens.Minus ||
			                        la.kind == Tokens.Not   || la.kind == Tokens.Times;
			
			SimpleExpr(
#line  3013 "VBNET.ATG" 
out expr);
			if (StartOf(40)) {
				AssignmentOperator(
#line  3015 "VBNET.ATG" 
out op);
				Expr(
#line  3015 "VBNET.ATG" 
out val);

#line  3015 "VBNET.ATG" 
				expr = new AssignmentExpression(expr, op, val); 
			} else if (la.kind == 1 || la.kind == 11 || la.kind == 98) {

#line  3016 "VBNET.ATG" 
				if (mustBeAssignment) Error("error in assignment."); 
			} else SynErr(277);

#line  3019 "VBNET.ATG" 
			// a field reference expression that stands alone is a
			// invocation expression without parantheses and arguments
			if(expr is MemberReferenceExpression || expr is IdentifierExpression) {
				expr = new InvocationExpression(expr);
			}
			statement = new ExpressionStatement(expr);
			
		} else if (la.kind == 60) {
			lexer.NextToken();
			SimpleExpr(
#line  3026 "VBNET.ATG" 
out expr);

#line  3026 "VBNET.ATG" 
			statement = new ExpressionStatement(expr); 
		} else if (la.kind == 211) {
			lexer.NextToken();

#line  3028 "VBNET.ATG" 
			Statement block;  
			if (
#line  3029 "VBNET.ATG" 
Peek(1).kind == Tokens.As) {

#line  3030 "VBNET.ATG" 
				LocalVariableDeclaration resourceAquisition = new LocalVariableDeclaration(Modifiers.None); 
				VariableDeclarator(
#line  3031 "VBNET.ATG" 
resourceAquisition.Variables);
				while (la.kind == 12) {
					lexer.NextToken();
					VariableDeclarator(
#line  3033 "VBNET.ATG" 
resourceAquisition.Variables);
				}
				Block(
#line  3035 "VBNET.ATG" 
out block);

#line  3037 "VBNET.ATG" 
				statement = new UsingStatement(resourceAquisition, block);
				
			} else if (StartOf(29)) {
				Expr(
#line  3039 "VBNET.ATG" 
out expr);
				Block(
#line  3040 "VBNET.ATG" 
out block);

#line  3041 "VBNET.ATG" 
				statement = new UsingStatement(new ExpressionStatement(expr), block); 
			} else SynErr(278);
			Expect(100);
			Expect(211);
		} else if (StartOf(41)) {
			LocalDeclarationStatement(
#line  3044 "VBNET.ATG" 
out statement);
		} else SynErr(279);
	}
开发者ID:Adam-Fogle,项目名称:agentralphplugin,代码行数:101,代码来源:Parser.cs


示例20: TrackedVisitLocalVariableDeclaration

 public override object TrackedVisitLocalVariableDeclaration(LocalVariableDeclaration localVariableDeclaration, object data)
 {
     return base.TrackedVisitLocalVariableDeclaration(localVariableDeclaration, localVariableDeclaration);
 }
开发者ID:ichengzi,项目名称:SharpDevelop,代码行数:4,代码来源:BclNRefactoryResourceResolver.cs



注:本文中的ICSharpCode.NRefactory.Ast.LocalVariableDeclaration类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Ast.MemberReferenceExpression类代码示例发布时间:2022-05-26
下一篇:
C# Ast.LambdaExpression类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap