---
source: full-moon/tests/pass_cases.rs
expression: ast.nodes()
input_file: full-moon/tests/roblox_cases/pass/types_chained_optionals
---
stmts:
  - - TypeDeclaration:
        type_token:
          leading_trivia: []
          token:
            start_position:
              bytes: 0
              line: 1
              character: 1
            end_position:
              bytes: 4
              line: 1
              character: 5
            token_type:
              type: Identifier
              identifier: type
          trailing_trivia:
            - start_position:
                bytes: 4
                line: 1
                character: 5
              end_position:
                bytes: 5
                line: 1
                character: 6
              token_type:
                type: Whitespace
                characters: " "
        base:
          leading_trivia: []
          token:
            start_position:
              bytes: 5
              line: 1
              character: 6
            end_position:
              bytes: 11
              line: 1
              character: 12
            token_type:
              type: Identifier
              identifier: Config
          trailing_trivia:
            - start_position:
                bytes: 11
                line: 1
                character: 12
              end_position:
                bytes: 12
                line: 1
                character: 13
              token_type:
                type: Whitespace
                characters: " "
        generics: ~
        equal_token:
          leading_trivia: []
          token:
            start_position:
              bytes: 12
              line: 1
              character: 13
            end_position:
              bytes: 13
              line: 1
              character: 14
            token_type:
              type: Symbol
              symbol: "="
          trailing_trivia:
            - start_position:
                bytes: 13
                line: 1
                character: 14
              end_position:
                bytes: 14
                line: 1
                character: 15
              token_type:
                type: Whitespace
                characters: " "
        declare_as:
          Table:
            braces:
              tokens:
                - leading_trivia: []
                  token:
                    start_position:
                      bytes: 14
                      line: 1
                      character: 15
                    end_position:
                      bytes: 15
                      line: 1
                      character: 16
                    token_type:
                      type: Symbol
                      symbol: "{"
                  trailing_trivia:
                    - start_position:
                        bytes: 15
                        line: 1
                        character: 16
                      end_position:
                        bytes: 16
                        line: 1
                        character: 16
                      token_type:
                        type: Whitespace
                        characters: "\n"
                - leading_trivia: []
                  token:
                    start_position:
                      bytes: 166
                      line: 5
                      character: 1
                    end_position:
                      bytes: 167
                      line: 5
                      character: 2
                    token_type:
                      type: Symbol
                      symbol: "}"
                  trailing_trivia: []
            fields:
              pairs:
                - Punctuated:
                    - key:
                        Name:
                          leading_trivia:
                            - start_position:
                                bytes: 16
                                line: 2
                                character: 1
                              end_position:
                                bytes: 20
                                line: 2
                                character: 5
                              token_type:
                                type: Whitespace
                                characters: "    "
                          token:
                            start_position:
                              bytes: 20
                              line: 2
                              character: 5
                            end_position:
                              bytes: 27
                              line: 2
                              character: 12
                            token_type:
                              type: Identifier
                              identifier: option1
                          trailing_trivia: []
                      colon:
                        leading_trivia: []
                        token:
                          start_position:
                            bytes: 27
                            line: 2
                            character: 12
                          end_position:
                            bytes: 28
                            line: 2
                            character: 13
                          token_type:
                            type: Symbol
                            symbol: ":"
                        trailing_trivia:
                          - start_position:
                              bytes: 28
                              line: 2
                              character: 13
                            end_position:
                              bytes: 29
                              line: 2
                              character: 14
                            token_type:
                              type: Whitespace
                              characters: " "
                      value:
                        Optional:
                          base:
                            Optional:
                              base:
                                Basic:
                                  leading_trivia: []
                                  token:
                                    start_position:
                                      bytes: 29
                                      line: 2
                                      character: 14
                                    end_position:
                                      bytes: 35
                                      line: 2
                                      character: 20
                                    token_type:
                                      type: Identifier
                                      identifier: string
                                  trailing_trivia: []
                              question_mark:
                                leading_trivia: []
                                token:
                                  start_position:
                                    bytes: 35
                                    line: 2
                                    character: 20
                                  end_position:
                                    bytes: 36
                                    line: 2
                                    character: 21
                                  token_type:
                                    type: Symbol
                                    symbol: "?"
                                trailing_trivia: []
                          question_mark:
                            leading_trivia: []
                            token:
                              start_position:
                                bytes: 36
                                line: 2
                                character: 21
                              end_position:
                                bytes: 37
                                line: 2
                                character: 22
                              token_type:
                                type: Symbol
                                symbol: "?"
                            trailing_trivia: []
                    - leading_trivia: []
                      token:
                        start_position:
                          bytes: 37
                          line: 2
                          character: 22
                        end_position:
                          bytes: 38
                          line: 2
                          character: 23
                        token_type:
                          type: Symbol
                          symbol: ","
                      trailing_trivia:
                        - start_position:
                            bytes: 38
                            line: 2
                            character: 23
                          end_position:
                            bytes: 39
                            line: 2
                            character: 24
                          token_type:
                            type: Whitespace
                            characters: " "
                        - start_position:
                            bytes: 39
                            line: 2
                            character: 24
                          end_position:
                            bytes: 78
                            line: 2
                            character: 63
                          token_type:
                            type: SingleLineComment
                            comment: " you probably need it once in a while"
                        - start_position:
                            bytes: 78
                            line: 2
                            character: 63
                          end_position:
                            bytes: 79
                            line: 2
                            character: 63
                          token_type:
                            type: Whitespace
                            characters: "\n"
                - Punctuated:
                    - key:
                        Name:
                          leading_trivia:
                            - start_position:
                                bytes: 79
                                line: 3
                                character: 1
                              end_position:
                                bytes: 83
                                line: 3
                                character: 5
                              token_type:
                                type: Whitespace
                                characters: "    "
                          token:
                            start_position:
                              bytes: 83
                              line: 3
                              character: 5
                            end_position:
                              bytes: 90
                              line: 3
                              character: 12
                            token_type:
                              type: Identifier
                              identifier: option2
                          trailing_trivia: []
                      colon:
                        leading_trivia: []
                        token:
                          start_position:
                            bytes: 90
                            line: 3
                            character: 12
                          end_position:
                            bytes: 91
                            line: 3
                            character: 13
                          token_type:
                            type: Symbol
                            symbol: ":"
                        trailing_trivia:
                          - start_position:
                              bytes: 91
                              line: 3
                              character: 13
                            end_position:
                              bytes: 92
                              line: 3
                              character: 14
                            token_type:
                              type: Whitespace
                              characters: " "
                      value:
                        Optional:
                          base:
                            Optional:
                              base:
                                Optional:
                                  base:
                                    Basic:
                                      leading_trivia: []
                                      token:
                                        start_position:
                                          bytes: 92
                                          line: 3
                                          character: 14
                                        end_position:
                                          bytes: 98
                                          line: 3
                                          character: 20
                                        token_type:
                                          type: Identifier
                                          identifier: string
                                      trailing_trivia: []
                                  question_mark:
                                    leading_trivia: []
                                    token:
                                      start_position:
                                        bytes: 98
                                        line: 3
                                        character: 20
                                      end_position:
                                        bytes: 99
                                        line: 3
                                        character: 21
                                      token_type:
                                        type: Symbol
                                        symbol: "?"
                                    trailing_trivia: []
                              question_mark:
                                leading_trivia: []
                                token:
                                  start_position:
                                    bytes: 99
                                    line: 3
                                    character: 21
                                  end_position:
                                    bytes: 100
                                    line: 3
                                    character: 22
                                  token_type:
                                    type: Symbol
                                    symbol: "?"
                                trailing_trivia: []
                          question_mark:
                            leading_trivia: []
                            token:
                              start_position:
                                bytes: 100
                                line: 3
                                character: 22
                              end_position:
                                bytes: 101
                                line: 3
                                character: 23
                              token_type:
                                type: Symbol
                                symbol: "?"
                            trailing_trivia: []
                    - leading_trivia: []
                      token:
                        start_position:
                          bytes: 101
                          line: 3
                          character: 23
                        end_position:
                          bytes: 102
                          line: 3
                          character: 24
                        token_type:
                          type: Symbol
                          symbol: ","
                      trailing_trivia:
                        - start_position:
                            bytes: 102
                            line: 3
                            character: 24
                          end_position:
                            bytes: 103
                            line: 3
                            character: 25
                          token_type:
                            type: Whitespace
                            characters: " "
                        - start_position:
                            bytes: 103
                            line: 3
                            character: 25
                          end_position:
                            bytes: 117
                            line: 3
                            character: 39
                          token_type:
                            type: SingleLineComment
                            comment: " once a year"
                        - start_position:
                            bytes: 117
                            line: 3
                            character: 39
                          end_position:
                            bytes: 118
                            line: 3
                            character: 39
                          token_type:
                            type: Whitespace
                            characters: "\n"
                - End:
                    key:
                      Name:
                        leading_trivia:
                          - start_position:
                              bytes: 118
                              line: 4
                              character: 1
                            end_position:
                              bytes: 122
                              line: 4
                              character: 5
                            token_type:
                              type: Whitespace
                              characters: "    "
                        token:
                          start_position:
                            bytes: 122
                            line: 4
                            character: 5
                          end_position:
                            bytes: 129
                            line: 4
                            character: 12
                          token_type:
                            type: Identifier
                            identifier: option3
                        trailing_trivia: []
                    colon:
                      leading_trivia: []
                      token:
                        start_position:
                          bytes: 129
                          line: 4
                          character: 12
                        end_position:
                          bytes: 130
                          line: 4
                          character: 13
                        token_type:
                          type: Symbol
                          symbol: ":"
                      trailing_trivia:
                        - start_position:
                            bytes: 130
                            line: 4
                            character: 13
                          end_position:
                            bytes: 131
                            line: 4
                            character: 14
                          token_type:
                            type: Whitespace
                            characters: " "
                    value:
                      Optional:
                        base:
                          Optional:
                            base:
                              Optional:
                                base:
                                  Optional:
                                    base:
                                      Optional:
                                        base:
                                          Optional:
                                            base:
                                              Basic:
                                                leading_trivia: []
                                                token:
                                                  start_position:
                                                    bytes: 131
                                                    line: 4
                                                    character: 14
                                                  end_position:
                                                    bytes: 137
                                                    line: 4
                                                    character: 20
                                                  token_type:
                                                    type: Identifier
                                                    identifier: string
                                                trailing_trivia: []
                                            question_mark:
                                              leading_trivia: []
                                              token:
                                                start_position:
                                                  bytes: 137
                                                  line: 4
                                                  character: 20
                                                end_position:
                                                  bytes: 138
                                                  line: 4
                                                  character: 21
                                                token_type:
                                                  type: Symbol
                                                  symbol: "?"
                                              trailing_trivia: []
                                        question_mark:
                                          leading_trivia: []
                                          token:
                                            start_position:
                                              bytes: 138
                                              line: 4
                                              character: 21
                                            end_position:
                                              bytes: 139
                                              line: 4
                                              character: 22
                                            token_type:
                                              type: Symbol
                                              symbol: "?"
                                          trailing_trivia: []
                                    question_mark:
                                      leading_trivia: []
                                      token:
                                        start_position:
                                          bytes: 139
                                          line: 4
                                          character: 22
                                        end_position:
                                          bytes: 140
                                          line: 4
                                          character: 23
                                        token_type:
                                          type: Symbol
                                          symbol: "?"
                                      trailing_trivia: []
                                question_mark:
                                  leading_trivia: []
                                  token:
                                    start_position:
                                      bytes: 140
                                      line: 4
                                      character: 23
                                    end_position:
                                      bytes: 141
                                      line: 4
                                      character: 24
                                    token_type:
                                      type: Symbol
                                      symbol: "?"
                                  trailing_trivia: []
                            question_mark:
                              leading_trivia: []
                              token:
                                start_position:
                                  bytes: 141
                                  line: 4
                                  character: 24
                                end_position:
                                  bytes: 142
                                  line: 4
                                  character: 25
                                token_type:
                                  type: Symbol
                                  symbol: "?"
                              trailing_trivia: []
                        question_mark:
                          leading_trivia: []
                          token:
                            start_position:
                              bytes: 142
                              line: 4
                              character: 25
                            end_position:
                              bytes: 143
                              line: 4
                              character: 26
                            token_type:
                              type: Symbol
                              symbol: "?"
                          trailing_trivia:
                            - start_position:
                                bytes: 143
                                line: 4
                                character: 26
                              end_position:
                                bytes: 144
                                line: 4
                                character: 27
                              token_type:
                                type: Whitespace
                                characters: " "
                            - start_position:
                                bytes: 144
                                line: 4
                                character: 27
                              end_position:
                                bytes: 165
                                line: 4
                                character: 48
                              token_type:
                                type: SingleLineComment
                                comment: " once in your life!"
                            - start_position:
                                bytes: 165
                                line: 4
                                character: 48
                              end_position:
                                bytes: 166
                                line: 4
                                character: 48
                              token_type:
                                type: Whitespace
                                characters: "\n"
    - ~
