public override void OnCustomStatement(CustomStatement node) { var typeMemberStmt = node as GeneratedTypeMemberStatement; if (null == typeMemberStmt) return; TypeMember typeMember = typeMemberStmt.TypeMember; InsertTypeMemberAt(typeMember, node); Visit(typeMember); RemoveCurrentNode(); }
override public object Clone() { CustomStatement clone = new CustomStatement(); clone._lexicalInfo = _lexicalInfo; clone._endSourceLocation = _endSourceLocation; clone._documentation = _documentation; clone._isSynthetic = _isSynthetic; clone._entity = _entity; if (_annotations != null) { clone._annotations = (Hashtable)_annotations.Clone(); } if (null != _modifier) { clone._modifier = _modifier.Clone() as StatementModifier; clone._modifier.InitializeParent(clone); } return(clone); }
override public object Clone() { CustomStatement clone = (CustomStatement)FormatterServices.GetUninitializedObject(typeof(CustomStatement)); clone._lexicalInfo = _lexicalInfo; clone._endSourceLocation = _endSourceLocation; clone._documentation = _documentation; clone._entity = _entity; if (_annotations != null) { clone._annotations = (Hashtable)_annotations.Clone(); } if (null != _modifier) { clone._modifier = _modifier.Clone() as StatementModifier; clone._modifier.InitializeParent(clone); } return(clone); }
override public object Clone() { CustomStatement clone = new CustomStatement(); clone._lexicalInfo = _lexicalInfo; clone._endSourceLocation = _endSourceLocation; clone._documentation = _documentation; clone._isSynthetic = _isSynthetic; clone._entity = _entity; if (_annotations != null) clone._annotations = (Hashtable)_annotations.Clone(); if (null != _modifier) { clone._modifier = _modifier.Clone() as StatementModifier; clone._modifier.InitializeParent(clone); } return clone; }
private void InsertTypeMemberAt(TypeMember typeMember, CustomStatement anchor) { var members = anchor.GetAncestor<TypeDefinition>().Members; members.Add(typeMember); }
public override void OnCustomStatement(CustomStatement node) { Error(CompilerErrorFactory.InvalidNode(node)); }