public AABlock( IList _statements_, TRBrace _token_ ) { this._statements_ = new TypedList(new Statements_Cast(this)); this._statements_.Clear(); this._statements_.AddAll(_statements_); SetToken(_token_); }
public void SetToken(TRBrace node) { if (_token_ != null) { _token_.Parent(null); } if (node != null) { if (node.Parent() != null) { node.Parent().RemoveChild(node); } node.Parent(this); } _token_ = node; }
internal override void RemoveChild(Node child) { if (_visibility_modifier_ == child) { _visibility_modifier_ = null; return; } if (_static_ == child) { _static_ = null; return; } if (_token_ == child) { _token_ = null; return; } if (_name_ == child) { _name_ = null; return; } if (_values_.Contains(child)) { _values_.Remove(child); return; } if (_end_token_ == child) { _end_token_ = null; return; } }
public AEnumDecl( PVisibilityModifier _visibility_modifier_, TStatic _static_, TEnum _token_, TIdentifier _name_, IList _values_, TRBrace _end_token_ ) { SetVisibilityModifier(_visibility_modifier_); SetStatic(_static_); SetToken(_token_); SetName(_name_); this._values_ = new TypedList(new Values_Cast(this)); this._values_.Clear(); this._values_.AddAll(_values_); SetEndToken(_end_token_); }
internal override void RemoveChild(Node child) { if (_token_ == child) { _token_ = null; return; } if (_dimention_ == child) { _dimention_ = null; return; } if (_int_dim_ == child) { _int_dim_ = null; return; } if (_end_token_ == child) { _end_token_ = null; return; } if (_type_ == child) { _type_ = null; return; } if (_decl_.Contains(child)) { _decl_.Remove(child); return; } }
public AEnrichmentDecl( TEnrichment _token_, PExp _dimention_, TIntegerLiteral _int_dim_, TRBrace _end_token_, PType _type_, IList _decl_ ) { SetToken(_token_); SetDimention(_dimention_); SetIntDim(_int_dim_); SetEndToken(_end_token_); SetType(_type_); this._decl_ = new TypedList(new Decl_Cast(this)); this._decl_.Clear(); this._decl_.AddAll(_decl_); }
internal override void RemoveChild(Node child) { if (_token_ == child) { _token_ = null; return; } if (_name_.Contains(child)) { _name_.Remove(child); return; } if (_decl_.Contains(child)) { _decl_.Remove(child); return; } if (_end_token_ == child) { _end_token_ = null; return; } }
internal override void RemoveChild(Node child) { if (_visibility_modifier_ == child) { _visibility_modifier_ = null; return; } if (_class_token_ == child) { _class_token_ = null; return; } if (_dimention_ == child) { _dimention_ = null; return; } if (_int_dim_ == child) { _int_dim_ = null; return; } if (_end_token_ == child) { _end_token_ = null; return; } if (_name_ == child) { _name_ = null; return; } if (_generic_vars_.Contains(child)) { _generic_vars_.Remove(child); return; } if (_base_ == child) { _base_ = null; return; } if (_locals_.Contains(child)) { _locals_.Remove(child); return; } }
public ATempNamespaceDecl( TNamespace _token_, IList _name_, IList _decl_, TRBrace _end_token_ ) { SetToken(_token_); this._name_ = new TypedList(new Name_Cast(this)); this._name_.Clear(); this._name_.AddAll(_name_); this._decl_ = new TypedList(new Decl_Cast(this)); this._decl_.Clear(); this._decl_.AddAll(_decl_); SetEndToken(_end_token_); }
public AStructDecl( PVisibilityModifier _visibility_modifier_, TClassToken _class_token_, PExp _dimention_, TIntegerLiteral _int_dim_, TRBrace _end_token_, TIdentifier _name_, IList _generic_vars_, PType _base_, IList _locals_ ) { SetVisibilityModifier(_visibility_modifier_); SetClassToken(_class_token_); SetDimention(_dimention_); SetIntDim(_int_dim_); SetEndToken(_end_token_); SetName(_name_); this._generic_vars_ = new TypedList(new GenericVars_Cast(this)); this._generic_vars_.Clear(); this._generic_vars_.AddAll(_generic_vars_); SetBase(_base_); this._locals_ = new TypedList(new Locals_Cast(this)); this._locals_.Clear(); this._locals_.AddAll(_locals_); }
internal override void RemoveChild(Node child) { if (_statements_.Contains(child)) { _statements_.Remove(child); return; } if (_token_ == child) { _token_ = null; return; } }
public virtual void CaseTRBrace(TRBrace node) { DefaultCase(node); }
public override void CaseATempNamespaceDecl(ATempNamespaceDecl node) { ANamespaceDecl visitMe = null; Node parent = node.Parent(); IList declList; if (parent is ANamespaceDecl) declList = ((ANamespaceDecl) parent).GetDecl(); else declList = ((AASourceFile)parent).GetDecl(); parent.RemoveChild(node); List<TIdentifier> identifiers = new List<TIdentifier>(); foreach (TIdentifier identifier in node.GetName()) { identifiers.Add(identifier); } foreach (TIdentifier identifier in identifiers) { TRBrace endToken = null; if (node.GetEndToken() != null) endToken = new TRBrace("}", node.GetEndToken().Line, node.GetEndToken().Pos); ANamespaceDecl ns = new ANamespaceDecl(new TNamespace("namespace", node.GetToken().Line, node.GetToken().Pos), identifier, new ArrayList(), endToken); if (visitMe == null) visitMe = ns; declList.Add(ns); declList = ns.GetDecl(); } while (node.GetDecl().Count > 0) { declList.Add(node.GetDecl()[0]); } visitMe.Apply(this); }
public override void CaseTRBrace(TRBrace node) { index = 56; }