override public object Clone() { StatementTypeMember clone = (StatementTypeMember)FormatterServices.GetUninitializedObject(typeof(StatementTypeMember)); clone._lexicalInfo = _lexicalInfo; clone._endSourceLocation = _endSourceLocation; clone._documentation = _documentation; clone._entity = _entity; if (_annotations != null) { clone._annotations = (Hashtable)_annotations.Clone(); } clone._modifiers = _modifiers; clone._name = _name; if (null != _attributes) { clone._attributes = _attributes.Clone() as AttributeCollection; clone._attributes.InitializeParent(clone); } if (null != _statement) { clone._statement = _statement.Clone() as Statement; clone._statement.InitializeParent(clone); } return(clone); }
override public object Clone() { StatementTypeMember clone = new StatementTypeMember(); clone._lexicalInfo = _lexicalInfo; clone._endSourceLocation = _endSourceLocation; clone._documentation = _documentation; clone._isSynthetic = _isSynthetic; clone._entity = _entity; if (_annotations != null) { clone._annotations = (Hashtable)_annotations.Clone(); } clone._modifiers = _modifiers; clone._name = _name; if (null != _attributes) { clone._attributes = _attributes.Clone() as AttributeCollection; clone._attributes.InitializeParent(clone); } if (null != _statement) { clone._statement = _statement.Clone() as Statement; clone._statement.InitializeParent(clone); } return(clone); }
private void ProcessStatementTypeMemberInitializer(ClassDefinition node, StatementTypeMember statementTypeMember) { var stmt = statementTypeMember.Statement; var initializer = GetInitializerFor(node, node.IsStatic); initializer.Body.Add(stmt); var entity = (InternalMethod) GetEntity(initializer); ProcessNodeInMethodContext(entity, entity, stmt); node.Members.Remove(statementTypeMember); }
public override void OnStatementTypeMember(StatementTypeMember node) { // statement type members are later // processed as initializers }
protected TypeMember member_macro() //throws RecognitionException, TokenStreamException { TypeMember result; MacroStatement s = null; result = null; try { // for error handling s=macro_stmt(); if (0==inputState.guessing) { result = new StatementTypeMember(s); result.Modifiers = _modifiers; AddAttributes(result.Attributes); } } catch (RecognitionException ex) { if (0 == inputState.guessing) { reportError(ex, "member_macro"); recover(ex,tokenSet_55_); } else { throw ex; } } return result; }
override public object Clone() { StatementTypeMember clone = new StatementTypeMember(); clone._lexicalInfo = _lexicalInfo; clone._endSourceLocation = _endSourceLocation; clone._documentation = _documentation; clone._isSynthetic = _isSynthetic; clone._entity = _entity; if (_annotations != null) clone._annotations = (Hashtable)_annotations.Clone(); clone._modifiers = _modifiers; clone._name = _name; if (null != _attributes) { clone._attributes = _attributes.Clone() as AttributeCollection; clone._attributes.InitializeParent(clone); } if (null != _statement) { clone._statement = _statement.Clone() as Statement; clone._statement.InitializeParent(clone); } return clone; }
public NodeGeneratorExpander(MacroStatement node) { _node = node; _typeMemberPrototype = node.ParentNode as StatementTypeMember; }
public NodeGeneratorExpander(MacroStatement node, bool addTypeMembersToEnclosingTypeDefinition) { _node = node; _addTypeMembersToEnclosingTypeDefinition = addTypeMembersToEnclosingTypeDefinition; _typeMemberPrototype = node.ParentNode as StatementTypeMember; }
public override void LeaveStatementTypeMember(StatementTypeMember node) { if (node.Statement == null) RemoveCurrentNode(); }