public virtual void OutADeclLocalDecl(ADeclLocalDecl node) { DefaultOut(node); }
public virtual void InADeclLocalDecl(ADeclLocalDecl node) { DefaultIn(node); }
public virtual void CaseADeclLocalDecl(ADeclLocalDecl node) { DefaultCase(node); }
public override void CaseADeclLocalDecl(ADeclLocalDecl node) { InADeclLocalDecl(node); if (node.GetDecl() != null) { node.GetDecl().Apply(this); } OutADeclLocalDecl(node); }
public override void OutAStructDecl(AStructDecl node) { //Insert parameterless constructor if ( !node.GetLocals().OfType<ADeclLocalDecl>().Select(localDecl => localDecl.GetDecl()).OfType <AConstructorDecl>().Any(constructor => constructor.GetFormals().Count == 0)) { PLocalDecl decl = new ADeclLocalDecl(new AConstructorDecl(new APublicVisibilityModifier(), new TIdentifier(node.GetName().Text), new ArrayList(), new ArrayList(), new AABlock(new ArrayList(), new TRBrace("}")))); node.GetLocals().Add(decl); decl.Apply(this); } //Add deconstructor if not present if (node.GetLocals().OfType<ADeclLocalDecl>().Select(localDecl => localDecl.GetDecl()).OfType<ADeconstructorDecl>().ToList().Count == 0) { PLocalDecl decl = new ADeclLocalDecl(new ADeconstructorDecl(new APublicVisibilityModifier(), new TIdentifier(node.GetName().Text), new ArrayList(), new AABlock(new ArrayList(), new TRBrace("}")))); node.GetLocals().Add(decl); decl.Apply(this); } if (node.GetVisibilityModifier() is AProtectedVisibilityModifier) errors.Add(new ErrorCollection.Error(node.GetName(), LocRM.GetString("ErrorText201"))); }
ArrayList New147() { ArrayList nodeList = new ArrayList(); ArrayList nodeArrayList1 = (ArrayList) Pop(); PDecl pdeclNode2 = (PDecl)nodeArrayList1[0]; ADeclLocalDecl plocaldeclNode1 = new ADeclLocalDecl ( pdeclNode2 ); nodeList.Add(plocaldeclNode1); return nodeList; }