Package gw.internal.gosu.parser
Class GosuClassParser
- java.lang.Object
-
- gw.internal.gosu.parser.ParserBase
-
- gw.internal.gosu.parser.GosuClassParser
-
- All Implemented Interfaces:
IParserPart
,ITokenizerOffsetMarker
,IGosuClassParser
public class GosuClassParser extends ParserBase implements IGosuClassParser, ITokenizerOffsetMarker
-
-
Field Summary
-
Fields inherited from class gw.internal.gosu.parser.ParserBase
_bDontOptimizeStatementLists, _offsetShift
-
-
Constructor Summary
Constructors Constructor Description GosuClassParser(GosuParser owner)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassStatement
getClassStatement()
int
getLineNumShift()
int
getOffsetMark()
int
getOffsetShift()
protected String
getScript()
int
nextIndexOfErrantDuplicateInnerClass(IGosuClassInternal enclosingGsClass, IGosuClassInternal innerClass)
static void
parseAnonymousInnerClass(GosuParser gosuParser, IGosuClassInternal innerGsClass)
void
parseDeclarations(IGosuClass gsCls)
Parses all declarations including:
Fields Methods Properties Inner types, recursivelyvoid
parseDefinitions(IGosuClass gsCls)
void
processFunctionSymbol(DynamicFunctionSymbol dfs, IGosuClassInternal gsClass)
List<ParseException>
resolveFunctionAndPropertyDecls(ISymbolTable table)
String
toString()
static boolean
violatesRepeatable(List<IGosuAnnotation> annotations, IGosuAnnotation anno)
-
Methods inherited from class gw.internal.gosu.parser.ParserBase
addBlockToBlockStack, captureAllSymbols, captureSymbol, copyBlockStackTo, eatBlock, eatBlock, eatOptionalSemiColon, eatTypeLiteral, findAndWrapLocation, findMathOpMethod, getCurrentEnclosingGosuClass, getCurrentlyInferringFunctionTypeVars, getOwner, getParsingAnonymousClass, getUncapturedSymbol, getValidator, isDontOptimizeStatementLists, isEvalClass, isParsingBlock, match, match, match, match, match, matchDeclarationKeyword, parseAnnotation, parseDotPathWord, peekExpression, peekInferringFunctionTypeVariableTypes, peekStatement, popExpression, popInferringFunctionTypeVariableTypes, popStatement, possiblyWrapWithCoercion, possiblyWrapWithImplicitCoercion, pushCurrentBlock, pushExpression, pushInferringFunctionTypeVars, pushStatement, resolveNamespace, resolveNamespaceSymbol, resolveRuntimeType, resolveSymbol, resolveType, resolveType, resolveTypeForArithmeticExpression, setBlocks, setDontOptimizeStatementLists, setIgnoreWarnings, setLineNumShift, setLocationForImplicitTypeAs, setOffsetShift, setOwner, setSnapshotSymbols, setSubTree, setValidator, shouldSnapshotSymbols, verifyComparable, verifyComparable, verifyComparable, verifyModifiersForFeature, verifyNonVoidExpression, verifyParsedElement, verifyParsedElement, verifyTypesComparable, verifyTypesComparable
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gw.lang.parser.IParserPart
getOwner, isDontOptimizeStatementLists, setDontOptimizeStatementLists, setLineNumShift, setValidator
-
-
-
-
Constructor Detail
-
GosuClassParser
public GosuClassParser(GosuParser owner)
-
-
Method Detail
-
parseAnonymousInnerClass
public static void parseAnonymousInnerClass(GosuParser gosuParser, IGosuClassInternal innerGsClass)
-
getScript
protected String getScript()
- Specified by:
getScript
in classParserBase
-
getLineNumShift
public int getLineNumShift()
- Specified by:
getLineNumShift
in interfaceIParserPart
- Overrides:
getLineNumShift
in classParserBase
-
getOffsetShift
public int getOffsetShift()
- Specified by:
getOffsetShift
in interfaceIParserPart
- Overrides:
getOffsetShift
in classParserBase
-
getOffsetMark
public int getOffsetMark()
- Specified by:
getOffsetMark
in interfaceITokenizerOffsetMarker
-
getClassStatement
public ClassStatement getClassStatement()
-
parseDeclarations
public void parseDeclarations(IGosuClass gsCls)
Parses all declarations including:
- Fields
- Methods
- Properties
- Inner types, recursively
- Specified by:
parseDeclarations
in interfaceIGosuClassParser
-
parseDefinitions
public void parseDefinitions(IGosuClass gsCls)
- Specified by:
parseDefinitions
in interfaceIGosuClassParser
-
processFunctionSymbol
public void processFunctionSymbol(DynamicFunctionSymbol dfs, IGosuClassInternal gsClass)
-
resolveFunctionAndPropertyDecls
public List<ParseException> resolveFunctionAndPropertyDecls(ISymbolTable table)
- Specified by:
resolveFunctionAndPropertyDecls
in interfaceIGosuClassParser
-
nextIndexOfErrantDuplicateInnerClass
public int nextIndexOfErrantDuplicateInnerClass(IGosuClassInternal enclosingGsClass, IGosuClassInternal innerClass)
-
violatesRepeatable
public static boolean violatesRepeatable(List<IGosuAnnotation> annotations, IGosuAnnotation anno)
-
-