/// <summary> /// Initializes a new instance of the <see cref="KeywordStatementASTWalker"/> class. /// </summary> /// <param name="node"></param> /// <param name="statement"></param> /// <param name="semanticModel">The semantic model.</param> protected KeywordStatementASTWalker(CSharpSyntaxNode node, KeywordStatementTranslationUnit keywordStatement, SemanticModel semanticModel) : base(node, semanticModel) { var breakSyntaxNode = node as BreakStatementSyntax; var continueSyntaxNode = node as ContinueStatementSyntax; if (breakSyntaxNode == null || continueSyntaxNode == null) { throw new ArgumentException( string.Format("Specified node is not one of these types: {0}, {1}!", typeof(BreakStatementSyntax).Name, typeof(ContinueStatementSyntax).Name)); } if (keywordStatement == null) { throw new ArgumentNullException(nameof(keywordStatement)); } // Node assigned in base, no need to assign it here this.statement = keywordStatement; }
/// <summary> /// Copy initializes a new instance of the <see cref="keyword"/> class. /// </summary> /// <param name="other"></param> /// <remarks> /// For testability. /// </remarks> public KeywordStatementTranslationUnit(KeywordStatementTranslationUnit other) : base(other) { this.keyword = other.keyword; }
/// <summary> /// Copy initializes a new instance of the <see cref="keyword"/> class. /// </summary> /// <param name="other"></param> /// <remarks> /// For testability. /// </remarks> public KeywordStatementTranslationUnit(KeywordStatementTranslationUnit other) : base(other) { this.keyword = other.keyword; }