### ----------------------------------------------------
### -- Config::TOML
### -- Licenses: Unlicense
### -- Authors: 
### -- File: t/grammar/02-arrays.rakutest
### ----------------------------------------------------
### -- Chunk 2 of 2
 is ok
        1979-05-27T07:32:00,# this is ok
        1979-05-27T00:32:00.999999,# this is ok
        1979-05-27# this is ok
        # this is ok
        # this is ok
        # this is ok
    ]
    EOF

    my Str $commented-array-of-arrays = Q:to/EOF/.trim;
    [# this is ok
        # this is ok
        [ [ 1, 2 ], [3, 4, 5] ], # this is ok
        [ [ 1, 2 ], ["a", "b", "c"] ],# this is ok
        [# this is ok
            # this is ok
            [ # this is ok
                # this is ok
                [#this is ok
                    # this is ok
                    # this is ok
                    '''#this is not a comment
                    line one # this is not a comment
                    line two # this is not a comment
                    line three # this is not a comment
                    ''',# this is ok
                    # this is ok
                    # this is ok
                    """
                    line four
                    line five
                    line six
                    """ # this is ok
                    # this is ok
                    # this is ok
                ], # this is ok
                [# this is ok
                    # this is ok
                    # this is ok
                    '''
                    line seven
                    line eight
                    line nine
                    ''', # this is ok
                    # this is ok
                    """
                    line ten
                    line eleven
                    line twelve
                    """#this is ok
                    # this is ok
                    # this is ok
                    # this is ok
                ],# this is ok
            # this is ok
            # this is ok
            # this is ok
            ], # this is ok
            # this is ok
            # this is ok
            [# this is ok
                3,# this is ok
                6,# this is ok
                9# this is ok
            ]# this is ok
        ]# this is ok
        # this is ok
        # this is ok
        # this is ok
    ]
    EOF

    my $match-commented-array-of-mixed-strings =
        Config::TOML::Parser::Grammar.parse(
            $commented-array-of-mixed-strings,
            :rule<array>
        );
    my $match-commented-array-of-integers =
        Config::TOML::Parser::Grammar.parse(
            $commented-array-of-integers,
            :rule<array>
        );
    my $match-commented-array-of-floats =
        Config::TOML::Parser::Grammar.parse(
            $commented-array-of-floats,
            :rule<array>
        );
    my $match-commented-array-of-booleans =
        Config::TOML::Parser::Grammar.parse(
            $commented-array-of-booleans,
            :rule<array>
        );
    my $match-commented-array-of-date-times =
        Config::TOML::Parser::Grammar.parse(
            $commented-array-of-date-times,
            :rule<array>
        );
    my $match-commented-array-of-arrays =
        Config::TOML::Parser::Grammar.parse(
            $commented-array-of-arrays,
            :rule<array>
        );

    is(
        $match-commented-array-of-mixed-strings.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse(
              $commented-array-of-mixed-strings,
              :rule<array>
           )] - 36 of 41
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal commented array
        ┃   Success   ┃    of mixed-strings successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-commented-array-of-integers.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($commented-array-of-integers, :rule<array>)] - 37 of 41
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal commented array
        ┃   Success   ┃    of integers successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-commented-array-of-floats.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($commented-array-of-floats, :rule<array>)] - 38 of 41
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal commented array
        ┃   Success   ┃    of floats successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-commented-array-of-booleans.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($commented-array-of-booleans, :rule<array>)] - 39 of 41
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal commented array
        ┃   Success   ┃    of booleans successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-commented-array-of-date-times.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse(
              $commented-array-of-date-times,
              :rule<array>
           )] - 40 of 41
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal commented array
        ┃   Success   ┃    of datetimes successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
    is(
        $match-commented-array-of-arrays.WHAT,
        Config::TOML::Parser::Grammar,
        q:to/EOF/
        ♪ [Grammar.parse($commented-array-of-arrays, :rule<array>)] - 41 of 41
        ┏━━━━━━━━━━━━━┓
        ┃             ┃  ∙ Parses string literal commented array
        ┃   Success   ┃    of arrays successfully
        ┃             ┃
        ┗━━━━━━━━━━━━━┛
        EOF
    );
});

# end commented array grammar tests }}}

# vim: expandtab shiftwidth=4


