public abstract class AbstractExpression extends Object implements Expression
AbstractExpression
Provides the common behaviour of expressions.
Modifier and Type | Field and Description |
---|---|
protected NodeLocation |
location |
protected boolean |
multipleReturnsAvailable |
protected int |
offset |
protected int |
tempOffset |
protected BType |
type |
protected WhiteSpaceDescriptor |
whiteSpaceDescriptor |
Constructor and Description |
---|
AbstractExpression(NodeLocation location,
WhiteSpaceDescriptor whiteSpaceDescriptor) |
Modifier and Type | Method and Description |
---|---|
NodeLocation |
getNodeLocation()
Returns the location of this node.
|
int |
getTempOffset()
Get Temporary Location of the stack frame of the expression.
|
BType |
getType() |
WhiteSpaceDescriptor |
getWhiteSpaceDescriptor()
Get information about whitespace associated with this particular node in source file.
|
boolean |
hasTemporaryValues() |
boolean |
isMultiReturnExpr() |
void |
setMultiReturnAvailable(boolean multiReturnsAvailable) |
void |
setOffset(int offset) |
void |
setTempOffset(int index)
Set Temporary Location in stack frame for storing expression result.
|
void |
setType(BType type) |
void |
setWhiteSpaceDescriptor(WhiteSpaceDescriptor whiteSpaceDescriptor) |
protected NodeLocation location
protected WhiteSpaceDescriptor whiteSpaceDescriptor
protected BType type
protected boolean multipleReturnsAvailable
protected int offset
protected int tempOffset
public AbstractExpression(NodeLocation location, WhiteSpaceDescriptor whiteSpaceDescriptor)
public BType getType()
getType
in interface Expression
public void setType(BType type)
setType
in interface Expression
public void setOffset(int offset)
setOffset
in interface Expression
public boolean isMultiReturnExpr()
isMultiReturnExpr
in interface Expression
public void setMultiReturnAvailable(boolean multiReturnsAvailable)
public NodeLocation getNodeLocation()
Node
NodeLocation
includes the source filename and the line number.
getNodeLocation
in interface Node
public void setWhiteSpaceDescriptor(WhiteSpaceDescriptor whiteSpaceDescriptor)
public WhiteSpaceDescriptor getWhiteSpaceDescriptor()
Node
getWhiteSpaceDescriptor
in interface Node
public int getTempOffset()
Expression
getTempOffset
in interface Expression
public void setTempOffset(int index)
Expression
setTempOffset
in interface Expression
index
- calculated temporary offset.public boolean hasTemporaryValues()
hasTemporaryValues
in interface Expression
Copyright © 2018 WSO2. All rights reserved.