Class ValueVisitor
- java.lang.Object
-
- org.antlr.v4.runtime.tree.AbstractParseTreeVisitor<T>
-
- org.tomlj.internal.TomlParserBaseVisitor<java.lang.Object>
-
- org.tomlj.ValueVisitor
-
- All Implemented Interfaces:
org.antlr.v4.runtime.tree.ParseTreeVisitor<java.lang.Object>,TomlParserVisitor<java.lang.Object>
final class ValueVisitor extends TomlParserBaseVisitor<java.lang.Object>
-
-
Field Summary
Fields Modifier and Type Field Description private TomlVersionversionprivate static java.util.regex.PatternzeroFloat
-
Constructor Summary
Constructors Constructor Description ValueVisitor(TomlVersion version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectaggregateResult(java.lang.Object aggregate, java.lang.Object nextResult)protected java.lang.ObjectdefaultResult()private java.lang.DoubletoDouble(java.lang.String s, org.antlr.v4.runtime.ParserRuleContext ctx)private java.lang.LongtoLong(java.lang.String s, int radix, org.antlr.v4.runtime.ParserRuleContext ctx)java.lang.ObjectvisitArray(TomlParser.ArrayContext ctx)Visit a parse tree produced byTomlParser.array().java.lang.ObjectvisitBinInt(TomlParser.BinIntContext ctx)Visit a parse tree produced byTomlParser.binInt().java.lang.ObjectvisitDecInt(TomlParser.DecIntContext ctx)Visit a parse tree produced byTomlParser.decInt().java.lang.ObjectvisitFalseBool(TomlParser.FalseBoolContext ctx)Visit a parse tree produced byTomlParser.falseBool().java.lang.ObjectvisitHexInt(TomlParser.HexIntContext ctx)Visit a parse tree produced byTomlParser.hexInt().java.lang.ObjectvisitInlineTable(TomlParser.InlineTableContext ctx)Visit a parse tree produced byTomlParser.inlineTable().java.lang.ObjectvisitLocalDate(TomlParser.LocalDateContext ctx)Visit a parse tree produced byTomlParser.localDate().java.lang.ObjectvisitLocalDateTime(TomlParser.LocalDateTimeContext ctx)Visit a parse tree produced byTomlParser.localDateTime().java.lang.ObjectvisitLocalTime(TomlParser.LocalTimeContext ctx)Visit a parse tree produced byTomlParser.localTime().java.lang.ObjectvisitOctInt(TomlParser.OctIntContext ctx)Visit a parse tree produced byTomlParser.octInt().java.lang.ObjectvisitOffsetDateTime(TomlParser.OffsetDateTimeContext ctx)Visit a parse tree produced byTomlParser.offsetDateTime().java.lang.ObjectvisitRegularFloat(TomlParser.RegularFloatContext ctx)Visit a parse tree produced byTomlParser.regularFloat().java.lang.ObjectvisitRegularFloatInf(TomlParser.RegularFloatInfContext ctx)Visit a parse tree produced byTomlParser.regularFloatInf().java.lang.ObjectvisitRegularFloatNaN(TomlParser.RegularFloatNaNContext ctx)Visit a parse tree produced byTomlParser.regularFloatNaN().java.lang.ObjectvisitString(TomlParser.StringContext ctx)Visit a parse tree produced byTomlParser.string().java.lang.ObjectvisitTrueBool(TomlParser.TrueBoolContext ctx)Visit a parse tree produced byTomlParser.trueBool().-
Methods inherited from class org.tomlj.internal.TomlParserBaseVisitor
visitArrayTable, visitArrayValue, visitArrayValues, visitBasicChar, visitBasicString, visitBasicUnescaped, visitBooleanValue, visitDate, visitDateTime, visitDay, visitEscaped, visitExpression, visitFloatValue, visitHour, visitHourOffset, visitInlineTableValues, visitInteger, visitKey, visitKeyval, visitLiteralBody, visitLiteralString, visitMinute, visitMinuteOffset, visitMlBasicChar, visitMlBasicString, visitMlBasicUnescaped, visitMlLiteralBody, visitMlLiteralString, visitMonth, visitQuotedKey, visitSecond, visitSecondFraction, visitSimpleKey, visitStandardTable, visitTable, visitTime, visitTimeOffset, visitToml, visitTomlKey, visitUnquotedKey, visitVal, visitYear
-
Methods inherited from class org.antlr.v4.runtime.tree.AbstractParseTreeVisitor
shouldVisitNextChild, visit, visitChildren, visitErrorNode, visitTerminal
-
-
-
-
Field Detail
-
zeroFloat
private static final java.util.regex.Pattern zeroFloat
-
version
private final TomlVersion version
-
-
Constructor Detail
-
ValueVisitor
ValueVisitor(TomlVersion version)
-
-
Method Detail
-
visitString
public java.lang.Object visitString(TomlParser.StringContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.string().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitStringin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitStringin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitDecInt
public java.lang.Object visitDecInt(TomlParser.DecIntContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.decInt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitDecIntin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitDecIntin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitHexInt
public java.lang.Object visitHexInt(TomlParser.HexIntContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.hexInt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitHexIntin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitHexIntin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOctInt
public java.lang.Object visitOctInt(TomlParser.OctIntContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.octInt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitOctIntin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitOctIntin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitBinInt
public java.lang.Object visitBinInt(TomlParser.BinIntContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.binInt().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitBinIntin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitBinIntin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
toLong
private java.lang.Long toLong(java.lang.String s, int radix, org.antlr.v4.runtime.ParserRuleContext ctx)
-
visitRegularFloat
public java.lang.Object visitRegularFloat(TomlParser.RegularFloatContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.regularFloat().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRegularFloatin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitRegularFloatin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRegularFloatInf
public java.lang.Object visitRegularFloatInf(TomlParser.RegularFloatInfContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.regularFloatInf().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRegularFloatInfin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitRegularFloatInfin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitRegularFloatNaN
public java.lang.Object visitRegularFloatNaN(TomlParser.RegularFloatNaNContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.regularFloatNaN().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitRegularFloatNaNin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitRegularFloatNaNin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
toDouble
private java.lang.Double toDouble(java.lang.String s, org.antlr.v4.runtime.ParserRuleContext ctx)
-
visitTrueBool
public java.lang.Object visitTrueBool(TomlParser.TrueBoolContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.trueBool().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitTrueBoolin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitTrueBoolin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitFalseBool
public java.lang.Object visitFalseBool(TomlParser.FalseBoolContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.falseBool().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitFalseBoolin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitFalseBoolin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitOffsetDateTime
public java.lang.Object visitOffsetDateTime(TomlParser.OffsetDateTimeContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.offsetDateTime().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitOffsetDateTimein interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitOffsetDateTimein classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLocalDateTime
public java.lang.Object visitLocalDateTime(TomlParser.LocalDateTimeContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.localDateTime().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLocalDateTimein interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitLocalDateTimein classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLocalDate
public java.lang.Object visitLocalDate(TomlParser.LocalDateContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.localDate().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLocalDatein interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitLocalDatein classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitLocalTime
public java.lang.Object visitLocalTime(TomlParser.LocalTimeContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.localTime().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitLocalTimein interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitLocalTimein classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitArray
public java.lang.Object visitArray(TomlParser.ArrayContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.array().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitArrayin interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitArrayin classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
visitInlineTable
public java.lang.Object visitInlineTable(TomlParser.InlineTableContext ctx)
Description copied from class:TomlParserBaseVisitorVisit a parse tree produced byTomlParser.inlineTable().The default implementation returns the result of calling
AbstractParseTreeVisitor.visitChildren(org.antlr.v4.runtime.tree.RuleNode)onctx.- Specified by:
visitInlineTablein interfaceTomlParserVisitor<java.lang.Object>- Overrides:
visitInlineTablein classTomlParserBaseVisitor<java.lang.Object>- Parameters:
ctx- the parse tree- Returns:
- the visitor result
-
aggregateResult
protected java.lang.Object aggregateResult(java.lang.Object aggregate, java.lang.Object nextResult)- Overrides:
aggregateResultin classorg.antlr.v4.runtime.tree.AbstractParseTreeVisitor<java.lang.Object>
-
defaultResult
protected java.lang.Object defaultResult()
- Overrides:
defaultResultin classorg.antlr.v4.runtime.tree.AbstractParseTreeVisitor<java.lang.Object>
-
-