X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Argument.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Argument.java index b1658bd..27da26c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Argument.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/ast/Argument.java @@ -1,23 +1,27 @@ /******************************************************************************* - * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others. + * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v0.5 + * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v05.html + * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: * IBM Corporation - initial API and implementation - ******************************************************************************/ + *******************************************************************************/ package net.sourceforge.phpdt.internal.compiler.ast; -import net.sourceforge.phpdt.internal.compiler.IAbstractSyntaxTreeVisitor; -import net.sourceforge.phpdt.internal.compiler.lookup.*; +import net.sourceforge.phpdt.internal.compiler.ASTVisitor; +import net.sourceforge.phpdt.internal.compiler.lookup.BlockScope; +import net.sourceforge.phpdt.internal.compiler.lookup.LocalVariableBinding; +import net.sourceforge.phpdt.internal.compiler.lookup.MethodScope; +import net.sourceforge.phpdt.internal.compiler.lookup.TypeBinding; public class Argument extends LocalDeclaration { public Argument(char[] name, long posNom, TypeReference tr, int modifiers) { super(null, name, (int) (posNom >>> 32), (int) posNom); + this.declarationSourceEnd = (int) posNom; this.modifiers = modifiers; type = tr; this.bits |= IsLocalDeclarationReachableMASK; @@ -26,7 +30,7 @@ public class Argument extends LocalDeclaration { public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) { if (this.type != null) - this.type.binding = typeBinding; + this.type.resolvedType = typeBinding; // record the resolved type into the type reference int modifierFlag = this.modifiers; if ((this.binding = scope.duplicateName(this.name)) != null) { @@ -40,7 +44,7 @@ public class Argument extends LocalDeclaration { if (typeBinding != null && isTypeUseDeprecated(typeBinding, scope)) scope.problemReporter().deprecatedType(typeBinding, this.type); this.binding.declaration = this; - this.binding.used = used; + this.binding.useFlag = used ? LocalVariableBinding.USED : LocalVariableBinding.UNUSED; } } @@ -58,7 +62,7 @@ public class Argument extends LocalDeclaration { scope.problemReporter().redefineArgument(this); return null; } - binding = new LocalVariableBinding(this, tb, modifiers, false); // argument decl, but local var (i.e. isArgument = false) + binding = new LocalVariableBinding(this, tb, modifiers, false); // argument decl, but local var (where isArgument = false) scope.addLocalVariable(binding); binding.constant = NotAConstant; return tb; @@ -79,7 +83,7 @@ public class Argument extends LocalDeclaration { return s; } - public void traverse(IAbstractSyntaxTreeVisitor visitor, BlockScope scope) { + public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (type != null) @@ -89,4 +93,4 @@ public class Argument extends LocalDeclaration { } visitor.endVisit(this, scope); } -} \ No newline at end of file +}