Package net.sourceforge.plantuml.tim
Class Eater
java.lang.Object
net.sourceforge.plantuml.tim.Eater
- Direct Known Subclasses:
EaterAffectation,EaterAffectationDefine,EaterAssert,EaterDeclareProcedure,EaterDeclareReturnFunction,EaterDumpMemory,EaterElseIf,EaterForeach,EaterFunctionCall,EaterIf,EaterIfdef,EaterIfndef,EaterImport,EaterInclude,EaterIncludeDef,EaterIncludeSprites,EaterIncludesub,EaterLegacyDefine,EaterLegacyDefineLong,EaterLog,EaterOption,EaterReturn,EaterStartsub,EaterTheme,EaterUndef,EaterWhile,StringEater
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidaddIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) protected final voidaddUpTo(char separator, StringBuilder sb) protected final voidabstract voidprotected final voidcheckAndEatChar(char ch) protected final voidprotected final Stringprotected final Stringfinal Stringprotected final Stringfinal Stringfinal Stringprotected final Stringprotected final TFunctionImpleatDeclareFunction(TContext context, TMemory memory, boolean unquoted, StringLocated location, boolean allowNoParenthesis, TFunctionType type) protected final TFunctionImpleatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, StringLocated location) protected final TFunctionImpleatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, boolean unquoted, StringLocated location) final TValueeatExpression(TContext context, TMemory memory) protected final TValueeatExpressionStopAtColon(TContext context, TMemory memory) final charprotected final TokenStackintfinal LineLocationfinal StringLocatedprotected final booleanfinal booleanprotected final voidoptionallyEatChar(char ch) final charpeekChar()final charprotected final booleansafeCheckAndEatChar(char ch) final voidprotected final voidskipUntilChar(char ch)
-
Constructor Details
-
Eater
-
-
Method Details
-
getLineLocation
-
getStringLocated
-
analyze
- Throws:
EaterException
-
getCurrentPosition
public int getCurrentPosition() -
eatAllToEnd
- Throws:
EaterException
-
eatExpression
- Throws:
EaterException
-
eatTokenStack
- Throws:
EaterException
-
eatExpressionStopAtColon
protected final TValue eatExpressionStopAtColon(TContext context, TMemory memory) throws EaterException - Throws:
EaterException
-
addIntoTokenStack
protected final void addIntoTokenStack(TokenStack tokenStack, boolean stopAtColon) throws EaterException - Throws:
EaterException
-
eatAndGetQuotedString
- Throws:
EaterException
-
eatAndGetOptionalQuotedString
- Throws:
EaterException
-
eatAndGetNumber
- Throws:
EaterException
-
eatAndGetSpaces
- Throws:
EaterException
-
eatAndGetVarname
- Throws:
EaterException
-
eatAndGetFunctionName
- Throws:
EaterException
-
skipSpaces
public final void skipSpaces() -
skipUntilChar
protected final void skipUntilChar(char ch) -
peekChar
public final char peekChar() -
matchAffectation
public final boolean matchAffectation() -
peekCharN2
public final char peekCharN2() -
hasNextChar
protected final boolean hasNextChar() -
eatOneChar
public final char eatOneChar() -
checkAndEatChar
- Throws:
EaterException
-
safeCheckAndEatChar
- Throws:
EaterException
-
optionallyEatChar
- Throws:
EaterException
-
checkAndEatChar
- Throws:
EaterException
-
addUpToLastLetterOrEmojiOrUnderscoreOrDigit
-
addUpTo
-
eatDeclareFunction
protected final TFunctionImpl eatDeclareFunction(TContext context, TMemory memory, boolean unquoted, StringLocated location, boolean allowNoParenthesis, TFunctionType type) throws EaterException - Throws:
EaterException
-
eatDeclareReturnFunctionWithOptionalReturn
protected final TFunctionImpl eatDeclareReturnFunctionWithOptionalReturn(TContext context, TMemory memory, boolean unquoted, StringLocated location) throws EaterException - Throws:
EaterException
-
eatDeclareProcedure
protected final TFunctionImpl eatDeclareProcedure(TContext context, TMemory memory, boolean unquoted, StringLocated location) throws EaterException - Throws:
EaterException
-