示例#1
0
 public override void CaseAEnrichmentDecl(AEnrichmentDecl node)
 {
     if (node.GetDimention() != null)
     {
         bool prevFolding = folding;
         int  prevValue   = value;
         bool wasANewExp  = isANewExp;
         folding = true;
         value   = 0;
         node.GetDimention().Apply(this);
         node.SetIntDim(new TIntegerLiteral(value.ToString()));
         folding   = prevFolding;
         value     = prevValue;
         isANewExp = wasANewExp;
     }
     base.CaseAEnrichmentDecl(node);
 }
        public EnrichmentDescription(AEnrichmentDecl structDecl)
        {
            Parser parser = new Parser(structDecl);

            Fields         = parser.Fields;
            Methods        = parser.Methods;
            Constructors   = parser.Constructors;
            Deconstructors = parser.Deconstructors;
            LineFrom       = structDecl.GetToken().Line;
            LineTo         = structDecl.GetEndToken().Line;
            type           = structDecl.GetType();
            type.Parent().RemoveChild(type);
            IsClass  = structDecl.GetDimention() != null;
            Position = TextPoint.FromCompilerCoords(structDecl.GetToken());
        }