public InternalLocal(Boo.Lang.Compiler.Ast.Local local, IType type) { _local = local; _type = type; _shared = false; }
override public object Clone() { Local clone = new Local(); clone._lexicalInfo = _lexicalInfo; clone._endSourceLocation = _endSourceLocation; clone._documentation = _documentation; clone._isSynthetic = _isSynthetic; clone._entity = _entity; if (_annotations != null) clone._annotations = (Hashtable)_annotations.Clone(); clone._name = _name; return clone; }
public InternalLocal(Local local, IType type) { _local = local; _type = type; IsShared = false; }
public static CompilerWarning AmbiguousVariableName(Local node, string localName, string baseName) { return new CompilerWarning("BCW0025", AstUtil.SafeLexicalInfo(node), localName, baseName); }
public override void OnLocal(Local node) { if (node.LexicalInfo != null) results.MapParsedNode(new MappedVariableDefinition(results, node)); base.OnLocal(node); }
override public bool Replace(Node existing, Node newNode) { if (base.Replace(existing, newNode)) { return(true); } if (_attributes != null) { Attribute item = existing as Attribute; if (null != item) { Attribute newItem = (Attribute)newNode; if (_attributes.Replace(item, newItem)) { return(true); } } } if (_parameters != null) { ParameterDeclaration item = existing as ParameterDeclaration; if (null != item) { ParameterDeclaration newItem = (ParameterDeclaration)newNode; if (_parameters.Replace(item, newItem)) { return(true); } } } if (_genericParameters != null) { GenericParameterDeclaration item = existing as GenericParameterDeclaration; if (null != item) { GenericParameterDeclaration newItem = (GenericParameterDeclaration)newNode; if (_genericParameters.Replace(item, newItem)) { return(true); } } } if (_returnType == existing) { this.ReturnType = (TypeReference)newNode; return(true); } if (_returnTypeAttributes != null) { Attribute item = existing as Attribute; if (null != item) { Attribute newItem = (Attribute)newNode; if (_returnTypeAttributes.Replace(item, newItem)) { return(true); } } } if (_body == existing) { this.Body = (Block)newNode; return(true); } if (_locals != null) { Local item = existing as Local; if (null != item) { Local newItem = (Local)newNode; if (_locals.Replace(item, newItem)) { return(true); } } } if (_explicitInfo == existing) { this.ExplicitInfo = (ExplicitMemberInfo)newNode; return(true); } return(false); }
public MappedVariableDefinition(CompileResults results, Local node) : base(results, node, node.Name.Length) { }