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 ClassStatementgetClassStatement()intgetLineNumShift()intgetOffsetMark()intgetOffsetShift()protected StringgetScript()intnextIndexOfErrantDuplicateInnerClass(IGosuClassInternal enclosingGsClass, IGosuClassInternal innerClass)static voidparseAnonymousInnerClass(GosuParser gosuParser, IGosuClassInternal innerGsClass)voidparseDeclarations(IGosuClass gsCls)Parses all declarations including:
Fields Methods Properties Inner types, recursivelyvoidparseDefinitions(IGosuClass gsCls)voidprocessFunctionSymbol(DynamicFunctionSymbol dfs, IGosuClassInternal gsClass)List<ParseException>resolveFunctionAndPropertyDecls(ISymbolTable table)StringtoString()static booleanviolatesRepeatable(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:
getScriptin classParserBase
-
getLineNumShift
public int getLineNumShift()
- Specified by:
getLineNumShiftin interfaceIParserPart- Overrides:
getLineNumShiftin classParserBase
-
getOffsetShift
public int getOffsetShift()
- Specified by:
getOffsetShiftin interfaceIParserPart- Overrides:
getOffsetShiftin classParserBase
-
getOffsetMark
public int getOffsetMark()
- Specified by:
getOffsetMarkin interfaceITokenizerOffsetMarker
-
getClassStatement
public ClassStatement getClassStatement()
-
parseDeclarations
public void parseDeclarations(IGosuClass gsCls)
Parses all declarations including:
- Fields
- Methods
- Properties
- Inner types, recursively
- Specified by:
parseDeclarationsin interfaceIGosuClassParser
-
parseDefinitions
public void parseDefinitions(IGosuClass gsCls)
- Specified by:
parseDefinitionsin interfaceIGosuClassParser
-
processFunctionSymbol
public void processFunctionSymbol(DynamicFunctionSymbol dfs, IGosuClassInternal gsClass)
-
resolveFunctionAndPropertyDecls
public List<ParseException> resolveFunctionAndPropertyDecls(ISymbolTable table)
- Specified by:
resolveFunctionAndPropertyDeclsin interfaceIGosuClassParser
-
nextIndexOfErrantDuplicateInnerClass
public int nextIndexOfErrantDuplicateInnerClass(IGosuClassInternal enclosingGsClass, IGosuClassInternal innerClass)
-
violatesRepeatable
public static boolean violatesRepeatable(List<IGosuAnnotation> annotations, IGosuAnnotation anno)
-
-