public class Program extends Expression implements IProgram
IGosuParser
_type
_tokens, UNDEF_FILE, UNDEF_FUNCTION, UNDEF_MODULE
EMPTY_ARRAY
Constructor and Description |
---|
Program()
Constructs a Program given an ISymbolTable instance.
|
evaluate, getContextType, getType, getTypeImpl, isNullSafe, isUnchecked, setType
addExceptionsFrom, addParseException, addParseException, addParseException, addParseExceptions, addParseIssues, addParseWarning, addParseWarnings, addToken, adjustColumn, adjustLineNum, assignTokens, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, compactParseTree, findAncestorParsedElementByType, findLineNumberOfDeclaration, findRootParsedElement, getAnnotations, getColumn, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getEnclosingFeatureInfo, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getLineNum, getModule, getParent, getQualifyingEnclosingTypeInfo, getTokens, hasImmediateParseIssue, hasImmediateParseWarning, hasImmediateParseWarnings, hasParseException, hasParseIssue, hasParseIssues, hasParseWarning, initEmptyParseTree, initLocation, isCompileTimeConstant, isSuppressed, isSuppressed, isSynthetic, makeDoubleValue, makeFloatValue, makeInteger, makeLong, removeParseException, removeParseWarning, removeParseWarningRecursively, setGosuProgram, setLineNum, setLocation, setParent, setSynthetic, shouldClearParseInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
evaluate, getContextType, isNullSafe, isUnchecked
addExceptionsFrom, addParseException, addParseException, addParseWarning, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, findAncestorParsedElementByType, findRootParsedElement, getColumn, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getLineNum, getModule, getParent, getTokens, hasImmediateParseIssue, hasImmediateParseWarnings, hasParseException, hasParseIssue, hasParseIssues, hasParseWarning, isCompileTimeConstant, isSuppressed, isSynthetic, setLocation, setParent
public Statement getMainStatement()
getMainStatement
in interface IProgram
public void setMainStatement(Statement mainStatement)
public Map getFunctions()
getFunctions
in interface IProgram
public void setFunctions(Map functions)
public IType getDeclaredReturnType()
public void setDeclaredReturnType(IType declaredReturnType)
public Object evaluate()
evaluate
in interface IExpression
evaluate
in class Expression
public void addParseWarning(IParseIssue warning)
addParseWarning
in interface IParsedElement
addParseWarning
in class ParsedElement
public ParseTree getLocation()
getLocation
in interface IParsedElement
getLocation
in class ParsedElement
public String toString()
Expression
toString
in class Expression
public IType getReturnType()
getReturnType
in interface IParsedElement
getReturnType
in class Expression
public boolean hasContent()
hasContent
in interface IProgram
public <E extends IParsedElement> boolean getContainedParsedElementsByType(Class<E> parsedElementType, List<E> listResults)
ParsedElement
getContainedParsedElementsByType
in interface IParsedElement
getContainedParsedElementsByType
in class ParsedElement
parsedElementType
- The type of parsed element to find.listResults
- A list of all the contained parsed elements matching the
specified type. Can be null if you are only interested in whether or not
parsedElementType exists in this element.public IParsedElementWithAtLeastOneDeclaration findDeclaringStatement(IParsedElement element, String identifierName)
findDeclaringStatement
in interface IParsedElement
findDeclaringStatement
in class ParsedElement
public List<IParseIssue> getParseIssues()
getParseIssues
in interface IParsedElement
getParseIssues
in class ParsedElement
public List<IParseIssue> getImmediateParseIssues()
getImmediateParseIssues
in interface IParsedElement
getImmediateParseIssues
in class ParsedElement
public boolean hasParseExceptions()
hasParseExceptions
in interface IParsedElement
hasParseExceptions
in class ParsedElement
public List<IParseIssue> getParseExceptions()
getParseExceptions
in interface IParsedElement
getParseExceptions
in class ParsedElement
public List<IParseIssue> getParseWarnings()
getParseWarnings
in interface IParsedElement
getParseWarnings
in class ParsedElement
public boolean hasParseWarnings()
hasParseWarnings
in interface IParsedElement
hasParseWarnings
in class ParsedElement
Copyright © 2016. All rights reserved.