コード例 #1
0
 public virtual TResult VisitStatementList([DisallowNull] DotStatementListSyntax statementList)
 {
     if (statementList == null)
     {
         throw new ArgumentNullException(nameof(statementList));
     }
     return(DefaultVisit(statementList));
 }
コード例 #2
0
ファイル: DotGraphSyntax.cs プロジェクト: ssyp-ru/ssyp20-ws09
 public DotGraphSyntax([AllowNull] KeywordSyntax?strict,
                       [DisallowNull] KeywordSyntax graphOrDigraph,
                       [AllowNull] DotIdSyntax?id,
                       [DisallowNull] PunctuationSyntax leftCurlyBracket,
                       [DisallowNull] DotStatementListSyntax statementList,
                       [DisallowNull] PunctuationSyntax rightCurlyBracket) : base(
         SyntaxKind.DotGraph,
         strict?.Start ?? graphOrDigraph?.Start ?? 0,
         (strict?.FullWidth ?? 0) + (graphOrDigraph?.FullWidth ?? 0) + (id?.FullWidth ?? 0) +
         (leftCurlyBracket?.FullWidth ?? 0) +
         (statementList?.FullWidth ?? 0) +
         (rightCurlyBracket?.FullWidth ?? 0),
         new SyntaxNode?[] { strict, graphOrDigraph, id, leftCurlyBracket, statementList, rightCurlyBracket })
 {
     Strict         = strict;
     GraphOrDigraph = graphOrDigraph ?? throw new ArgumentNullException(nameof(graphOrDigraph));
     Id             = id;
     OpeningBracket = leftCurlyBracket ?? throw new ArgumentNullException(nameof(leftCurlyBracket));
     StatementList  = statementList ?? throw new ArgumentNullException(nameof(statementList));
     ClosingBracket = rightCurlyBracket ?? throw new ArgumentNullException(nameof(rightCurlyBracket));
 }