com.caucho.quercus.parser
Class Scope

java.lang.Object
  extended by com.caucho.quercus.parser.Scope
Direct Known Subclasses:
ClassScope, FunctionScope, GlobalScope

public abstract class Scope
extends java.lang.Object

Parse scope.


Field Summary
protected  Scope _parent
           
 
Constructor Summary
Scope()
           
Scope(Scope parent)
           
 
Method Summary
abstract  InterpretedClassDef addClass(Location location, java.lang.String name, java.lang.String parent, java.util.ArrayList<java.lang.String> ifaceList, int index, boolean isTop)
          Adds a class.
protected abstract  void addConditionalClass(InterpretedClassDef def)
           
protected  void addConditionalFunction(Function function)
           
protected  void addConditionalFunction(java.lang.String name, Function function)
           
 void addConstant(java.lang.String name, Expr value)
          Adds a constant.
abstract  void addFunction(java.lang.String name, Function function, boolean isTop)
          Adds a function.
 Scope getParent()
           
 boolean isAbstract()
          Returns true for an abstract scope, e.g.
 boolean isClass()
           
 boolean isFunction()
           
 boolean isGlobal()
           
 boolean isIf()
           
 boolean isSwitchCase()
           
 boolean isTry()
           
 boolean isWhile()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_parent

protected Scope _parent
Constructor Detail

Scope

public Scope()

Scope

public Scope(Scope parent)
Method Detail

isAbstract

public boolean isAbstract()
Returns true for an abstract scope, e.g. an abstract class or an interface.


isGlobal

public boolean isGlobal()

isClass

public boolean isClass()

isFunction

public boolean isFunction()

isIf

public boolean isIf()

isSwitchCase

public boolean isSwitchCase()

isWhile

public boolean isWhile()

isTry

public boolean isTry()

getParent

public Scope getParent()

addConstant

public void addConstant(java.lang.String name,
                        Expr value)
Adds a constant.


addFunction

public abstract void addFunction(java.lang.String name,
                                 Function function,
                                 boolean isTop)
Adds a function.


addConditionalFunction

protected void addConditionalFunction(java.lang.String name,
                                      Function function)

addConditionalFunction

protected void addConditionalFunction(Function function)

addClass

public abstract InterpretedClassDef addClass(Location location,
                                             java.lang.String name,
                                             java.lang.String parent,
                                             java.util.ArrayList<java.lang.String> ifaceList,
                                             int index,
                                             boolean isTop)
Adds a class.


addConditionalClass

protected abstract void addConditionalClass(InterpretedClassDef def)