コード例 #1
0
ファイル: Statements.cs プロジェクト: edgar-pek/VCDryad
 private Expression GetInitialValue()
 {
     VccArrayTypeExpression /*?*/
     arrayTypeExpression = this.ContainingLocalDeclarationsStatement.TypeExpression as VccArrayTypeExpression;
       var baseInit = base.InitialValue;
       if (baseInit == null && arrayTypeExpression != null && arrayTypeExpression.Size != null) {
     VccLocalDefinition loc = this.LocalVariable as VccLocalDefinition;
     var isSpec = loc != null ? loc.IsSpec : false;
     var result = new VccCreateStackArray(arrayTypeExpression.ElementType, arrayTypeExpression.Size, isSpec,
                                SourceDummy.SourceLocation);
     var containingExpression = new DummyExpression(this.ContainingLocalDeclarationsStatement.ContainingBlock, SourceDummy.SourceLocation);
     result.SetContainingExpression(containingExpression);
     return result;
       }
       else if (baseInit == null) {
     return new DummyExpression(this.Name.SourceLocation);
       }
       else return baseInit;
 }
コード例 #2
0
ファイル: Expressions.cs プロジェクト: edgar-pek/VCDryad
 protected VccCreateStackArray(BlockStatement containingBlock, VccCreateStackArray template)
     : base(containingBlock, template)
 {
     this.isSpec = template.isSpec;
 }