示例#1
0
 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
 protected VccCreateStackArray(BlockStatement containingBlock, VccCreateStackArray template)
     : base(containingBlock, template)
 {
     this.isSpec = template.isSpec;
 }