public override void VisitInterfaceDeclaration(InterfaceDeclarationSyntax node) { var intfObj = CSharpEntityCreationHelper.CreateInterface(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(intfObj); base.VisitInterfaceDeclaration(node); m_currentParent = oldParent; }
public override void VisitEnumDeclaration(EnumDeclarationSyntax node) { var enumObj = CSharpEntityCreationHelper.CreateEnum(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(enumObj); base.VisitEnumDeclaration(node); m_currentParent = oldParent; }
public override void VisitForEachStatement(ForEachStatementSyntax node) { var foreachObj = CSharpEntityCreationHelper.CreateForEachBlock(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(foreachObj); base.VisitForEachStatement(node); m_currentParent = oldParent; }
public override void VisitStructDeclaration(StructDeclarationSyntax node) { var classObj = CSharpEntityCreationHelper.CreateStruct(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(classObj); base.VisitStructDeclaration(node); m_currentParent = oldParent; }
public override void VisitWhileStatement(WhileStatementSyntax node) { var whileObj = CSharpEntityCreationHelper.CreateWhileBlock(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(whileObj); base.VisitWhileStatement(node); m_currentParent = oldParent; }
public override void VisitCatchClause(CatchClauseSyntax node) { var catchObj = CSharpEntityCreationHelper.CreateCatchBlock(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(catchObj); base.VisitCatchClause(node); m_currentParent = oldParent; }
public override void VisitElseClause(ElseClauseSyntax node) { var elseObj = CSharpEntityCreationHelper.CreateElseBlock(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(elseObj); base.VisitElseClause(node); m_currentParent = oldParent; }
public override void VisitPropertyDeclaration(PropertyDeclarationSyntax node) { var propertyObj = CSharpEntityCreationHelper.CreateProperty(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(propertyObj); base.VisitPropertyDeclaration(node); m_currentParent = oldParent; }
public override void VisitTryStatement(TryStatementSyntax node) { var tryObj = CSharpEntityCreationHelper.CreateTryBlock(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(tryObj); base.VisitTryStatement(node); m_currentParent = oldParent; }
public override void VisitDestructorDeclaration(DestructorDeclarationSyntax node) { var methodObj = CSharpEntityCreationHelper.CreateMethod(node, m_currentParent, m_currentCodeFile, m_currentTree); ISyntaxEntity oldParent = setCurrentParent(methodObj); base.VisitDestructorDeclaration(node); m_currentParent = oldParent; }
public override void VisitIndexerDeclaration(IndexerDeclarationSyntax node) { var prop = CSharpEntityCreationHelper.CreateProperty(node, m_currentParent, m_currentCodeFile, m_currentTree); Debug.Assert(prop.IsIndexer); ISyntaxEntity oldParent = setCurrentParent(prop); base.VisitIndexerDeclaration(node); m_currentParent = oldParent; }
public override void VisitConversionOperatorDeclaration(ConversionOperatorDeclarationSyntax node) { var methodObj = CSharpEntityCreationHelper.CreateMethod(node, m_currentParent, m_currentCodeFile, m_currentTree); Debug.Assert(methodObj.TypeOfFunction == FunctionTypes.ConversionOperator); ISyntaxEntity oldParent = setCurrentParent(methodObj); base.VisitConversionOperatorDeclaration(node); m_currentParent = oldParent; }
public override void VisitAnonymousMethodExpression(AnonymousMethodExpressionSyntax node) { var methodObj = CSharpEntityCreationHelper.CreateMethod(node, m_currentParent, m_currentCodeFile, m_currentTree); Debug.Assert(methodObj.TypeOfFunction == FunctionTypes.AnonymousDelegate); ISyntaxEntity oldParent = setCurrentParent(methodObj); base.VisitAnonymousMethodExpression(node); m_currentParent = oldParent; }
public override void VisitNamespaceDeclaration(NamespaceDeclarationSyntax node) { if (node == null) { throw new InvalidOperationException("Namespace Declaration node is null!"); } var namespaceObj = new NamespaceDefinition(node.Name.GetText().ToString().Trim(), new FileSpan(m_currentTree.GetLineSpan(node.Span)), m_currentParent, m_currentCodeFile); namespaceObj.AssociatedComment = CSharpEntityCreationHelper.GetComment(namespaceObj, node, m_currentTree, m_currentCodeFile); ISyntaxEntity oldParent = setCurrentParent(namespaceObj); base.VisitNamespaceDeclaration(node); m_currentParent = oldParent; }
public override void VisitParameter(ParameterSyntax node) { FormalParameter fp = CSharpEntityCreationHelper.CreateFormalParameter(node); if (m_currentParent.GetType() == typeof(FunctionDefinition)) { (m_currentParent as FunctionDefinition).AddFormalParameter(fp); } else if (m_currentParent.GetType() == typeof(MemberProperty)) { (m_currentParent as MemberProperty).SoleParameter = fp; } else { String msg = String.Format(CultureInfo.InvariantCulture, "Cannot process parameter if parent is: {0} [{1}]", m_currentParent.Kind, m_currentParent.Name); throw new InvalidOperationException(msg); } base.VisitParameter(node); }