com.caucho.quercus.expr
Class ConstExpr

java.lang.Object
  extended by com.caucho.quercus.expr.Expr
      extended by com.caucho.quercus.expr.ConstExpr
Direct Known Subclasses:
ConstExprPro

public class ConstExpr
extends Expr

Represents a PHP constant expression.


Field Summary
protected  java.lang.String _var
           
 
Fields inherited from class com.caucho.quercus.expr.Expr
COMPILE_ARG_MAX
 
Constructor Summary
ConstExpr(Location location, java.lang.String var)
           
ConstExpr(java.lang.String var)
           
 
Method Summary
 Expr createClassConst(QuercusParser parser, java.lang.String name)
          Creates a class field Foo::bar
 Expr createClassField(QuercusParser parser, Expr name)
          Creates a class field Foo::${bar}
 Expr createClassField(QuercusParser parser, java.lang.String name)
          Creates a class field Foo::$bar
 Value eval(Env env)
          Evaluates the expression.
 Value evalConstant()
          Returns true for literal
 java.lang.String getVar()
          Returns the variable.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.quercus.expr.Expr
assign, canRead, createAssign, createAssignFrom, createAssignRef, createCall, createCopy, createDeref, createFieldGet, createFieldGet, createIsset, createRef, createUnset, evalArg, evalArgs, evalArray, evalArrayAssign, evalAssignRef, evalAssignValue, evalBoolean, evalChar, evalConstantPrefix, evalConstantSuffix, evalCopy, evalDirty, evalDouble, evalIsset, evalLong, evalObject, evalPostIncrement, evalPreIncrement, evalRef, evalString, evalStringValue, evalTop, evalUnsetArray, evalValue, evalVar, getFileName, getFunctionLocation, getLine, getLocation, getLocationLine, isArray, isAssign, isBoolean, isConstant, isDouble, isFalse, isLiteral, isLong, isNumber, isRef, isString, isTrue, isVar, print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_var

protected final java.lang.String _var
Constructor Detail

ConstExpr

public ConstExpr(Location location,
                 java.lang.String var)

ConstExpr

public ConstExpr(java.lang.String var)
Method Detail

getVar

public java.lang.String getVar()
Returns the variable.


createClassConst

public Expr createClassConst(QuercusParser parser,
                             java.lang.String name)
Creates a class field Foo::bar

Overrides:
createClassConst in class Expr

createClassField

public Expr createClassField(QuercusParser parser,
                             java.lang.String name)
Creates a class field Foo::$bar

Overrides:
createClassField in class Expr

createClassField

public Expr createClassField(QuercusParser parser,
                             Expr name)
Creates a class field Foo::${bar}

Overrides:
createClassField in class Expr

evalConstant

public Value evalConstant()
Returns true for literal

Overrides:
evalConstant in class Expr
Returns:
the expression value.

eval

public Value eval(Env env)
Evaluates the expression.

Specified by:
eval in class Expr
Parameters:
env - the calling environment.
Returns:
the expression value.

toString

public java.lang.String toString()
Overrides:
toString in class Expr