public final class GosuParser extends ParserBase implements IGosuParser
IGosuParser.ParseType, IGosuParser.Settings| Modifier and Type | Field and Description |
|---|---|
static ErrorType |
notfound |
static IType |
PENDING_BOUNDING_TYPE |
_bDontOptimizeStatementLists, _offsetShiftBIGD_ZERO, DOUBLE_DIGITS, NaN, ONE, ZEROaddBlockToBlockStack, captureAllSymbols, captureSymbol, copyBlockStackTo, eatBlock, eatBlock, eatBlock, eatBlock, eatOptionalSemiColon, eatTypeLiteral, findAndWrapLocation, findMathOpMethod, getCurrentEnclosingGosuClass, getCurrentlyInferringFunctionTypeVars, getLineNumShift, getOffsetShift, getOwner, getParsingAnonymousClass, getUncapturedSymbol, getValidator, isDontOptimizeStatementLists, isEvalClass, isParsingBlock, match, match, match, match, match, matchDeclarationKeyword, parseAnnotation, parseDotPathWord, popInferringFunctionTypeVariableTypes, possiblyWrapWithCoercion, possiblyWrapWithImplicitCoercion, pushCurrentBlock, pushInferringFunctionTypeVars, resolveNamespace, resolveNamespaceSymbol, resolveRuntimeType, resolveSymbol, resolveType, resolveType, resolveTypeForArithmeticExpression, setBlocks, setDontOptimizeStatementLists, setIgnoreWarnings, setLineNumShift, setLocationForImplicitTypeAs, setOffsetShift, setOwner, setSnapshotSymbols, setSubTree, shouldSnapshotSymbols, verifyComparable, verifyComparable, verifyComparable, verifyModifiersForFeature, verifyNonVoidExpression, verifyParsedElement, verifyParsedElement, verifyTypesComparable, verifyTypesComparableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisParsingBlock, setIgnoreWarnings, setSnapshotSymbolsgetLineNumShift, getOffsetShift, getOwner, isDontOptimizeStatementLists, setDontOptimizeStatementLists, setLineNumShiftpublic static final IType PENDING_BOUNDING_TYPE
public static ErrorType notfound
public void setValidator(IGosuValidator validator)
setValidator in interface IParserPartsetValidator in class ParserBasepublic IScriptPartId getScriptPart()
getScriptPart in interface IGosuParserpublic Stack<IScriptPartId> getScriptPartIdStack()
public void pushScriptPart(IScriptPartId partId)
public void setScript(CharSequence source)
setScript in interface IGosuParserpublic void setScript(ISource src)
setScript in interface IGosuParserpublic void setScript(SourceCodeReader reader)
setScript in interface IGosuParserpublic void resetScript()
protected String getScript()
getScript in class ParserBasepublic ISymbolTable getSymbolTable()
getSymbolTable in interface IGosuParserpublic void setSymbolTable(ISymbolTable symTable)
setSymbolTable in interface IGosuParserpublic ITypeUsesMap getTypeUsesMap()
getTypeUsesMap in interface IGosuParserpublic void setTypeUsesMap(ITypeUsesMap typeUsesMap)
setTypeUsesMap in interface IGosuParserpublic String getNamespace()
public IScriptabilityModifier getVisibilityConstraint()
public ITokenizerInstructor getTokenizerInstructor()
getTokenizerInstructor in interface IGosuParserpublic void setTokenizerInstructor(ITokenizerInstructor tokenizerInstructor)
setTokenizerInstructor in interface IGosuParserpublic FunctionType peekParsingFunction()
public boolean isParsingFunction()
isParsingFunction in interface IGosuParserpublic VarStatement peekParsingFieldInitializer()
public boolean isParsingFieldInitializer()
public Statement parseStatements(IScriptPartId partId) throws ParseResultsException
parseStatements in interface IGosuParserParseResultsExceptionpublic IProgram parseProgram(IScriptPartId partId) throws ParseResultsException
parseProgram in interface IGosuParserParseResultsExceptionpublic IProgram parseProgram(IScriptPartId partId, IType expectedExpressionType) throws ParseResultsException
parseProgram in interface IGosuParserParseResultsExceptionpublic IProgram parseProgram(IScriptPartId partId, IType expectedExpressionType, IFileContext ctx, boolean assignRuntime) throws ParseResultsException
parseProgram in interface IGosuParserParseResultsExceptionpublic IProgram parseProgram(IScriptPartId partId, IType expectedExpressionType, IFileContext ctx, boolean assignRuntime, boolean bDoNotThrowParseResultsException) throws ParseResultsException
parseProgram in interface IGosuParserParseResultsExceptionpublic IProgram parseProgram(IScriptPartId partId, boolean isolatedScope, IType expectedExpressionType) throws ParseResultsException
parseProgram in interface IGosuParserParseResultsExceptionpublic IProgram parseProgram(IScriptPartId partId, boolean isolatedScope, boolean reallyIsolatedScope, IType expectedExpressionType, IFileContext ctx, boolean assignRuntime) throws ParseResultsException
parseProgram in interface IGosuParserParseResultsExceptionpublic IProgram parseProgram(IScriptPartId partId, boolean isolatedScope, boolean reallyIsolatedScope, IType expectedExpressionType, IFileContext ctx, boolean assignRuntime, boolean bDoNotThrowParseResultsException) throws ParseResultsException
parseProgram in interface IGosuParserParseResultsExceptionpublic IProgram parseProgram(IScriptPartId partId, boolean isolatedScope, boolean reallyIsolatedScope, IType expectedExpressionType, IFileContext ctx, boolean assignRuntime, boolean bDoNotThrowParseResultsException, IType superType) throws ParseResultsException
parseProgram in interface IGosuParserParseResultsExceptionpublic void setGenerateRootExpressionAccessForProgram(boolean bGenRootExprAccess)
setGenerateRootExpressionAccessForProgram in interface IGosuParserpublic boolean isGenerateRootExpressionAccessForProgram()
public Expression parseExp(IScriptPartId partId) throws ParseResultsException
parseExp in interface IGosuParserParseResultsExceptionpublic Expression parseExp(IScriptPartId partId, IType expectedExpressionType) throws ParseResultsException
parseExp in interface IGosuParserParseResultsExceptionpublic Expression parseExp(IScriptPartId partId, IType expectedExpressionType, IFileContext context, boolean assignRuntime) throws ParseResultsException
parseExp in interface IGosuParserParseResultsExceptionpublic IExpression parseExpOrProgram(IScriptPartId partId) throws ParseResultsException
parseExpOrProgram in interface IGosuParserParseResultsExceptionpublic IExpression parseExpOrProgram(IScriptPartId partId, boolean isolatedScope, boolean assignRuntime) throws ParseResultsException
parseExpOrProgram in interface IGosuParserParseResultsExceptionpublic IExpression parseExpOrProgram(IScriptPartId partId, IType typeExpected, boolean isolatedScope, boolean assignRuntime) throws ParseResultsException
ParseResultsExceptionpublic TypeLiteral parseTypeLiteral(IScriptPartId partId) throws ParseResultsException
parseTypeLiteral in interface IGosuParserParseResultsExceptionpublic boolean isParsed()
isParsed in interface IGosuParserprotected void setParsed(boolean bParsed)
public final SourceCodeTokenizer getTokenizer()
getTokenizer in interface IGosuParserpublic List<IParseTree> getLocations()
getLocations in interface IGosuParserpublic ParseTree peekLocation()
public boolean hasWarnings()
hasWarnings in interface IGosuParserpublic boolean isThrowParseResultsExceptionForWarnings()
isThrowParseResultsExceptionForWarnings in interface IGosuParserpublic void setThrowParseExceptionForWarnings(boolean bThrowParseExceptionForWarnings)
setThrowParseExceptionForWarnings in interface IGosuParserpublic void setContextInferenceManager(ContextInferenceManager ctxInferenceMgr)
public void pushInferredContextTypes(ContextType ctxType)
public void popInferredContextTypes()
public ContextType getContextType()
public boolean isCaptureSymbolsForEval()
isCaptureSymbolsForEval in interface IGosuParserpublic void setCaptureSymbolsForEval(boolean bCaputreSymbolsForEval)
setCaptureSymbolsForEval in interface IGosuParserpublic boolean isParsingStaticFeature()
public void pushParsingStaticMember(Boolean bParsingStaticFeature)
public void popParsingStaticMember()
public boolean isParsingAbstractConstructor()
public void pushParsingAbstractConstructor(Boolean bParsingAbstractConstructor)
public void popParsingAbstractConstructor()
public boolean parseTypeLiteral()
parseTypeLiteral in interface IGosuParserpublic boolean parseTypeLiteral(Token token)
public UsesStatementList parseUsesStatementList(boolean bResolveUsesTypes)
parseUsesStatementList in interface IGosuParserpublic boolean doParametersReifyToSameBytecodeType(IDynamicFunctionSymbol dfs, IDynamicFunctionSymbol dfsExisting)
public ArrayList<ISymbol> parseParameterDeclarationList(IParsedElement element, boolean bStatic, List<IType> inferredArgumentTypes)
parseParameterDeclarationList in interface IGosuParserpublic ArrayList<ISymbol> parseParameterDeclarationList(IParsedElement element, boolean bStatic, List<IType> inferredArgumentTypes, boolean bProperty, boolean bGetter, boolean bEmpty, boolean bVarDynamicArg)
protected void pushExpression(Expression e)
pushExpression in class ParserBasepublic Expression popExpression()
popExpression in interface IGosuParserpopExpression in class ParserBasepublic void setTokenizer(ISourceCodeTokenizer tokenizer)
setTokenizer in interface IGosuParserprotected Expression peekExpression()
peekExpression in class ParserBaseprotected ParsedElement peekParsedElement()
protected void pushStatement(Statement stmt)
pushStatement in class ParserBaseprotected Statement popStatement()
popStatement in class ParserBaseprotected Statement peekStatement()
peekStatement in class ParserBaseprotected void pushDynamicFunctionSymbol(DynamicFunctionSymbol stmt)
protected DynamicFunctionSymbol popDynamicFunctionSymbol()
protected DynamicFunctionSymbol peekDynamicFunctionSymbol()
protected void clearDfsStack()
public void putDfsDeclsInTable(ISymbolTable table)
putDfsDeclsInTable in interface IGosuParserpublic void putDfsDeclInSetByName(IDynamicFunctionSymbol dfs)
putDfsDeclInSetByName in interface IGosuParserpublic int nextIndexOfErrantDuplicateDynamicSymbol(IDynamicSymbol ds, Collection<? extends ISymbol> symbols, boolean bCheckContains)
public void setDfsDeclInSetByName(Map<String,List<IFunctionSymbol>> dfsDecl)
setDfsDeclInSetByName in interface IGosuParserprotected void newDfsDeclInSetByName()
public Map<String,List<IFunctionSymbol>> getDfsDecls()
getDfsDecls in interface IGosuParserprotected List<IFunctionType> getFunctionTypesForName(String strFunctionName)
protected TypeLiteral resolveTypeLiteral(String[] T)
protected TypeLiteral resolveTypeLiteral(String[] T, boolean bRelative, boolean bInterface)
protected List<IFunctionSymbol> getDfsDeclsForFunction(String strFunctionName)
public TypeLiteral resolveTypeLiteral(String strTypeName)
resolveTypeLiteral in interface IGosuParserstrTypeName - public TypeLiteral resolveTypeLiteral(String strTypeName, boolean bRelative, boolean bInterface)
public HashMap<String,ITypeVariableDefinition> getTypeVariables()
getTypeVariables in interface IGosuParserprotected void setTypeVariables(HashMap<String,ITypeVariableDefinition> map)
public IGosuClassInternal parseClass(String strQualifiedClassName, ISourceFileHandle sourceFile, boolean bThrowOnWarnings, boolean bFullyCompile) throws ParseResultsException
parseClass in interface IGosuParserParseResultsExceptionpublic IFunctionType getFunctionType(IType classBean, String functionName, Expression[] eArgs, List<IFunctionType> listAllMatchingMethods, GosuParser parser, boolean bMatchParamTypes) throws ParseException
ParseExceptionpublic IConstructorType getConstructorType(IType classBean, Expression[] eArgs, List<IConstructorType> listAllMatchingMethods, ParserBase parserState) throws ParseException
classBean - The declaring class of the constructor.parserState - The parserState that may be involved in the process of parsing a constructor. Can be null.ParseExceptionpublic void setWarnOnCaseIssue(boolean warnOnCaseIssue)
setWarnOnCaseIssue in interface IGosuParserpublic void setEditorParser(boolean bStudioEditorParser)
setEditorParser in interface IGosuParserpublic boolean isEditorParser()
isEditorParser in interface IGosuParserpublic IParserState getState()
getState in interface IGosuParserpublic boolean isParsingAnnotation()
public void setParsingAnnotation(boolean parsingAnnotation)
public boolean isAllowingWildcards()
public void setAllowWildcards(boolean allowWildcards)
public boolean isIgnoreTypeDeprecation()
public void pushIgnoreTypeDeprecation()
public void popIgnoreTypeDeprecation()
public void setLocationsFromProgramClassParser(List<ParseTree> savedLocations)
protected void pushTypeVariableTypesToInfer(IInvocableType functionType)
Copyright © 2017. All rights reserved.