anvil.script.expression
Class Expression

java.lang.Object
  |
  +--anvil.script.expression.Node
        |
        +--anvil.script.expression.Parent
              |
              +--anvil.script.expression.UnaryParent
                    |
                    +--anvil.script.expression.Expression

public class Expression
extends UnaryParent

class Expression


Field Summary
static int IS_DYNAMIC
           
static int IS_FALSE
           
static int IS_TRUE
           
static Expression NULL
           
static Expression UNDEFINED
           
 
Fields inherited from class anvil.script.expression.UnaryParent
_child
 
Fields inherited from class anvil.script.expression.Node
DELETE, EXPR_ADD, EXPR_AND, EXPR_ARRAY, EXPR_ASSIGN, EXPR_ASSIGN_ADD, EXPR_ASSIGN_CONCAT, EXPR_ASSIGN_DIVIDE, EXPR_ASSIGN_INIT, EXPR_ASSIGN_MODULO, EXPR_ASSIGN_MULTIPLY, EXPR_ASSIGN_SUBST, EXPR_ASSIGN_SUBTRACT, EXPR_ATTRIBUTE, EXPR_BOOLEAN_CAST, EXPR_CALL, EXPR_CLASSOF, EXPR_CLONE, EXPR_COMPARE, EXPR_COMPARISON_CHAIN, EXPR_CONCATENATION, EXPR_CONDITIONAL, EXPR_CONSTANT, EXPR_CONSTANT_VARIABLE, EXPR_COPY, EXPR_DEFAULT_MAPPING, EXPR_DEFINED, EXPR_DELETE, EXPR_DIVIDE, EXPR_EMPTY_REFERENCE, EXPR_EQUAL, EXPR_EXACT_EQUAL, EXPR_EXACT_NOT_EQUAL, EXPR_FLOAT_CAST, EXPR_FOREACH, EXPR_GREATER, EXPR_GREATER_EQUAL, EXPR_HAS, EXPR_IMPORT, EXPR_IN, EXPR_INT_CAST, EXPR_INVOKE, EXPR_IS, EXPR_LESS, EXPR_LESS_EQUAL, EXPR_LINK, EXPR_LIST, EXPR_MAPPING, EXPR_MATCH, EXPR_MODULO, EXPR_MULTIPLY, EXPR_NAMED, EXPR_NAMESPACE, EXPR_NEW, EXPR_NO_MATCH, EXPR_NOT, EXPR_NOT_EQUAL, EXPR_OR, EXPR_PIPE, EXPR_POSTFIX_DECREMENT, EXPR_POSTFIX_INCREMENT, EXPR_PREFIX_DECREMENT, EXPR_PREFIX_INCREMENT, EXPR_RANGE, EXPR_REFERENCE, EXPR_SELECT, EXPR_SIZEOF, EXPR_SPLICE, EXPR_STRING_BUFFER, EXPR_STRING_CAST, EXPR_SUBTRACT, EXPR_SYMBOL, EXPR_THIS, EXPR_THUNK, EXPR_TYPE, EXPR_TYPEOF, EXPR_UNARY_MINUS, EXPR_UNARY_PLUS, EXPR_VARIABLE, EXPR_XOR, GET, GET_BOOLEAN, GET_REF, GET_TYPE, GET_UNREF, NONE
 
Constructor Summary
Expression(Node child, Location location)
           
 
Method Summary
protected  void addLine(ByteCompiler context)
           
 void check(ErrorListener context)
           
 void compile(ByteCompiler context, int operation)
           
 void compile(ByteCompiler context, Node child)
           
 int conditionOf()
           
 Any constant()
           
 void createNegation()
           
 Any eval()
           
 Location getLocation()
           
 boolean isAssignable()
           
 boolean isConstant()
           
 boolean isUpdatable()
           
 Node optimize()
           
 
Methods inherited from class anvil.script.expression.UnaryParent
childs, getChild, getChild, setChild
 
Methods inherited from class anvil.script.expression.Parent
findNamed, findNamedIndex, hasNamedParameters, hasSplices, optimizeChilds, toString
 
Methods inherited from class anvil.script.expression.Node
typeOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IS_TRUE

public static final int IS_TRUE
See Also:
Constant Field Values

IS_FALSE

public static final int IS_FALSE
See Also:
Constant Field Values

IS_DYNAMIC

public static final int IS_DYNAMIC
See Also:
Constant Field Values

NULL

public static Expression NULL

UNDEFINED

public static Expression UNDEFINED
Constructor Detail

Expression

public Expression(Node child,
                  Location location)
Method Detail

getLocation

public Location getLocation()

isAssignable

public boolean isAssignable()
Overrides:
isAssignable in class Node

isUpdatable

public boolean isUpdatable()
Overrides:
isUpdatable in class Node

isConstant

public boolean isConstant()
Overrides:
isConstant in class Parent

constant

public Any constant()

conditionOf

public int conditionOf()

check

public void check(ErrorListener context)
Overrides:
check in class Parent

optimize

public Node optimize()
Overrides:
optimize in class Parent

eval

public Any eval()
Overrides:
eval in class Parent

createNegation

public void createNegation()

addLine

protected void addLine(ByteCompiler context)

compile

public void compile(ByteCompiler context,
                    int operation)
Overrides:
compile in class UnaryParent

compile

public void compile(ByteCompiler context,
                    Node child)
Overrides:
compile in class Node