Exemplo n.º 1
0
 internal VccMatchCase MakeCopyFor(VccMatchStatement stmt)
 {
     if (stmt == this.containingMatchStatement)
     {
         return(this);
     }
     return(new VccMatchCase(stmt, this));
 }
Exemplo n.º 2
0
 public void SetContainingMatchStatement(VccMatchStatement stmt)
 {
     this.containingMatchStatement = stmt;
     if (this.pattern != null)
     {
         this.pattern.SetContainingExpression(new DummyExpression(stmt.Block, SourceDummy.SourceLocation));
     }
     Body.SetContainingBlock(stmt.Block);
 }
Exemplo n.º 3
0
 private VccMatchCase(VccMatchStatement stmt, VccMatchCase template)
     : base(template.sourceLocation)
 {
     this.containingMatchStatement = stmt;
     this._body = (BlockStatement)template.Body.MakeCopyFor(stmt.Block);
     if (template.pattern != null)
     {
         this.pattern = template.pattern.MakeCopyFor(stmt.Block);
     }
 }
Exemplo n.º 4
0
        private VccMatchStatement(BlockStatement containingBlock, VccMatchStatement template)
            : base(containingBlock, template)
        {
            var cases = new List <VccMatchCase>();

            foreach (var cs in template.cases)
            {
                cases.Add(cs.MakeCopyFor(this));
            }
            cases.TrimExcess();
            this.cases      = cases;
            this.expression = template.expression.MakeCopyFor(containingBlock);
        }
Exemplo n.º 5
0
 private VccMatchStatement(BlockStatement containingBlock, VccMatchStatement template)
     : base(containingBlock, template)
 {
     var cases = new List<VccMatchCase>();
       foreach (var cs in template.cases)
     cases.Add(cs.MakeCopyFor(this));
       cases.TrimExcess();
       this.cases = cases;
       this.expression = template.expression.MakeCopyFor(containingBlock);
 }
Exemplo n.º 6
0
 internal VccMatchCase MakeCopyFor(VccMatchStatement stmt)
 {
     if (stmt == this.containingMatchStatement)
     return this;
       return new VccMatchCase(stmt, this);
 }
Exemplo n.º 7
0
 public void SetContainingMatchStatement(VccMatchStatement stmt)
 {
     this.containingMatchStatement = stmt;
       if (this.pattern != null) {
     this.pattern.SetContainingExpression(new DummyExpression(stmt.Block, SourceDummy.SourceLocation));
       }
       Body.SetContainingBlock(stmt.Block);
 }
Exemplo n.º 8
0
 private VccMatchCase(VccMatchStatement stmt, VccMatchCase template)
     : base(template.sourceLocation)
 {
     this.containingMatchStatement = stmt;
       this._body = (BlockStatement)template.Body.MakeCopyFor(stmt.Block);
       if (template.pattern != null)
     this.pattern = template.pattern.MakeCopyFor(stmt.Block);
 }