|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.caucho.es.parser.Expr
Expr is an intermediate form representing an expression.
| Field Summary | |
protected Block |
block
|
protected ParseClass |
cl
|
private java.lang.String |
filename
|
protected Function |
function
|
protected boolean |
isTop
|
protected java.lang.Class |
javaType
|
private int |
line
|
protected boolean |
noValue
|
protected int |
type
|
protected static int |
TYPE_BOOLEAN
|
protected static int |
TYPE_ES
|
protected static int |
TYPE_INTEGER
|
protected static int |
TYPE_JAVA
|
protected static int |
TYPE_LONG
|
protected static int |
TYPE_NUMBER
|
protected static int |
TYPE_STRING
|
protected static int |
TYPE_UNKNOWN
|
protected static int |
TYPE_VOID
|
protected int |
withDepth
|
| Constructor Summary | |
(package private) |
Expr(Block block)
|
| Method Summary | |
(package private) Expr |
assign(Expr value)
The assignment operator |
(package private) Expr |
binaryOp(int lex,
int op,
Expr rexpr)
A binary op |
(package private) Expr |
cast(Expr castType)
|
(package private) Expr |
conditional(Expr mexpr,
Expr rexpr)
The conditional ? : operation |
(package private) Expr |
delete()
The delete operator |
(package private) Expr |
doVoid()
A unary op |
private ESException |
error(java.lang.String msg)
|
(package private) void |
exprStatement(Function fun)
|
(package private) Expr |
fieldReference(ESId id)
Gets the field of the current expr |
(package private) Expr |
fieldReference(Expr expr)
Gets the field of the current expr |
(package private) java.lang.String |
getFilename()
|
(package private) java.lang.Class |
getJavaClass()
Returns the Java class representing this type. |
(package private) int |
getLine()
|
(package private) int |
getType()
Returns the javascript type of the expression. |
(package private) Expr |
getTypeExpr()
|
(package private) boolean |
isNum()
|
(package private) boolean |
isNumeric()
True if the type of this expression is easily converted to a number. |
(package private) boolean |
isSimple()
|
(package private) void |
killValue()
|
(package private) Expr |
next(java.lang.String iter,
Expr lhs)
|
(package private) Expr |
postfix(int op)
Handle autoincrement |
(package private) Expr |
prefix(int op)
Handle autoincrement |
(package private) void |
print()
|
(package private) void |
printBoolean()
|
(package private) void |
printBooleanImpl()
|
(package private) void |
printExpr()
|
(package private) void |
printImpl()
|
(package private) void |
printInt32()
|
(package private) void |
printInt32Impl()
|
(package private) void |
printInt64()
|
(package private) void |
printInt64Impl()
|
(package private) void |
printJava()
Prints the expression as a java object. |
(package private) void |
printJavaClass(java.lang.Class type)
|
(package private) void |
printJavaImpl()
|
(package private) void |
printJavaString()
|
(package private) void |
printLiteral(ESBase literal)
|
(package private) void |
printNum()
|
(package private) void |
printNumImpl()
|
(package private) void |
printStr()
Prints a string value |
(package private) void |
printString()
Print where the result is a string. |
(package private) void |
printStringImpl()
|
(package private) Expr |
setBoolean()
This expression will be used in a boolean context. |
(package private) void |
setTop()
|
(package private) void |
setUsed()
|
(package private) CallExpr |
startCall()
|
(package private) CallExpr |
startNew()
|
(package private) Expr |
typeof()
The typeof operator |
(package private) Expr |
unaryOp(int op)
A unary op |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected static final int TYPE_UNKNOWN
protected static final int TYPE_ES
protected static final int TYPE_STRING
protected static final int TYPE_NUMBER
protected static final int TYPE_LONG
protected static final int TYPE_INTEGER
protected static final int TYPE_BOOLEAN
protected static final int TYPE_JAVA
protected static final int TYPE_VOID
protected ParseClass cl
protected Block block
protected Function function
protected int type
protected java.lang.Class javaType
protected boolean isTop
protected boolean noValue
private java.lang.String filename
private int line
protected int withDepth
| Constructor Detail |
Expr(Block block)
| Method Detail |
java.lang.String getFilename()
int getLine()
void killValue()
void setUsed()
void setTop()
int getType()
Expr getTypeExpr()
java.lang.Class getJavaClass()
boolean isSimple()
boolean isNumeric()
boolean isNum()
Expr setBoolean()
Expr next(java.lang.String iter, Expr lhs) throws ESException
Expr fieldReference(Expr expr)
Expr fieldReference(ESId id) throws ESException
Expr unaryOp(int op)
Expr doVoid()
Expr typeof()
Expr delete() throws ESException
Expr assign(Expr value) throws ESException
CallExpr startCall() throws ESException
CallExpr startNew() throws ESException
Expr prefix(int op) throws ESException
Expr postfix(int op)
Expr binaryOp(int lex, int op, Expr rexpr) throws ESException
Expr cast(Expr castType) throws ESException
Expr conditional(Expr mexpr, Expr rexpr)
void printExpr() throws java.io.IOException
void print() throws java.io.IOException
void printBoolean() throws java.io.IOException
void printInt32() throws java.io.IOException
void printInt64() throws java.io.IOException
void printNum() throws java.io.IOException
void printJava() throws java.io.IOException
void printStr() throws java.io.IOException
void printJavaString() throws java.io.IOException
void printJavaClass(java.lang.Class type) throws java.io.IOException
void printString() throws java.io.IOException
void printImpl() throws java.io.IOException
void printBooleanImpl() throws java.io.IOException
void printNumImpl() throws java.io.IOException
void printInt32Impl() throws java.io.IOException
void printInt64Impl() throws java.io.IOException
void printStringImpl() throws java.io.IOException
void printJavaImpl() throws java.io.IOException
void printLiteral(ESBase literal) throws java.io.IOException
void exprStatement(Function fun) throws ESException
private ESException error(java.lang.String msg)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||