예제 #1
0
        public override void Visit(DateTimeValueSyntax dateTimeValueSyntax)
        {
            switch (dateTimeValueSyntax.Kind)
            {
            case SyntaxKind.OffsetDateTime:
                _currentValue = new TomlDateTime(ObjectKind.OffsetDateTime, dateTimeValueSyntax.Value);
                break;

            case SyntaxKind.LocalDateTime:
                _currentValue = new TomlDateTime(ObjectKind.LocalDateTime, dateTimeValueSyntax.Value);
                break;

            case SyntaxKind.LocalDate:
                _currentValue = new TomlDateTime(ObjectKind.LocalDate, dateTimeValueSyntax.Value);
                break;

            case SyntaxKind.LocalTime:
                _currentValue = new TomlDateTime(ObjectKind.LocalTime, dateTimeValueSyntax.Value);
                break;
            }
        }
예제 #2
0
 public override void Visit(DateTimeValueSyntax dateTimeValueSyntax)
 {
     throw new NotImplementedException("ValueTable TOML does not allow DateTimes.");
 }