Exemplo n.º 1
0
 public InternalLocal(Boo.Lang.Compiler.Ast.Local local, IType type)
 {
     _local = local;
     _type = type;
     _shared = false;
 }
Exemplo n.º 2
0
		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;


		}
Exemplo n.º 3
0
		public InternalLocal(Local local, IType type)
		{			
			_local = local;
			_type = type;
			IsShared = false;
		}
Exemplo n.º 4
0
 public static CompilerWarning AmbiguousVariableName(Local node, string localName, string baseName)
 {
     return new CompilerWarning("BCW0025", AstUtil.SafeLexicalInfo(node), localName, baseName);
 }
Exemplo n.º 5
0
 public override void OnLocal(Local node)
 {
     if (node.LexicalInfo != null)
         results.MapParsedNode(new MappedVariableDefinition(results, node));
     base.OnLocal(node);
 }
Exemplo n.º 6
0
 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)
 {
 }