public abstract class Expression extends ParsedElement implements IExpression
IGosuParser| Modifier and Type | Field and Description |
|---|---|
protected IType |
_type |
_tokens, UNDEF_FILE, UNDEF_FUNCTION, UNDEF_MODULEEMPTY_ARRAY| Constructor and Description |
|---|
Expression() |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate() |
Object |
evaluate(IExternalSymbolMap externalSymbols) |
IType |
getContextType()
Context type is the type this literal value evaluates as in the context
of a containing expression e.g., given the expression, n == "42", the
literal "42" is always converted to a Number.
|
IType |
getReturnType() |
IType |
getType()
Returns this Expression's IType.
|
protected IType |
getTypeImpl() |
boolean |
isNullSafe() |
boolean |
isUnchecked() |
void |
setType(IType type)
Sets this Expression's IType.
|
abstract String |
toString()
Subclasses should return a String representing the parsed expression.
|
addExceptionsFrom, addParseException, addParseException, addParseException, addParseExceptions, addParseIssues, addParseWarning, addParseWarning, addParseWarnings, addToken, adjustColumn, adjustLineNum, assignTokens, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, compactParseTree, findAncestorParsedElementByType, findDeclaringStatement, findLineNumberOfDeclaration, findRootParsedElement, getAnnotations, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getEnclosingFeatureInfo, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getQualifyingEnclosingTypeInfo, getTokens, hasImmediateParseIssue, hasImmediateParseWarning, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, initEmptyParseTree, initLocation, isCompileTimeConstant, isSuppressed, isSuppressed, isSynthetic, makeDoubleValue, makeFloatValue, makeInteger, makeLong, removeParseException, removeParseWarning, removeParseWarningRecursively, setGosuProgram, setLineNum, setLocation, setParent, setSynthetic, shouldClearParseInfoclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddExceptionsFrom, addParseException, addParseException, addParseWarning, addParseWarning, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, findAncestorParsedElementByType, findDeclaringStatement, findRootParsedElement, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getTokens, hasImmediateParseIssue, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, isCompileTimeConstant, isSuppressed, isSynthetic, setLocation, setParentprotected IType _type
public IType getType()
protected IType getTypeImpl()
public void setType(IType type)
public boolean isNullSafe()
isNullSafe in interface IExpressionpublic boolean isUnchecked()
isUnchecked in interface IExpressionpublic Object evaluate()
evaluate in interface IExpressionpublic Object evaluate(IExternalSymbolMap externalSymbols)
evaluate in interface IExpressionpublic IType getReturnType()
getReturnType in interface IParsedElementpublic IType getContextType()
getContextType in interface IExpressionCopyright © 2016. All rights reserved.