DefinitionTree {
    definitions: [
        Interface(
            InterfaceDefinition {
                comments: CommentGroup {
                    comments: [],
                },
                attributes: [],
                interface: Keyword {
                    value: "interface",
                    position: 0,
                },
                name: Identifier {
                    position: 10,
                    value: "IFoo",
                },
                templates: None,
                extends: None,
                body: InterfaceDefinitionBody {
                    left_brace: 15,
                    members: [
                        Constructor(
                            AbstractConstructorDefinition {
                                comments: CommentGroup {
                                    comments: [],
                                },
                                attributes: [],
                                modifiers: ModifierGroupDefinition {
                                    position: 28,
                                    modifiers: [
                                        Public(
                                            Keyword {
                                                value: "public",
                                                position: 21,
                                            },
                                        ),
                                    ],
                                },
                                function: Keyword {
                                    value: "function",
                                    position: 28,
                                },
                                name: Identifier {
                                    position: 37,
                                    value: "__construct",
                                },
                                parameters: FunctionLikeParameterListDefinition {
                                    comments: CommentGroup {
                                        comments: [],
                                    },
                                    left_parenthesis: 48,
                                    parameters: CommaSeparated {
                                        inner: [
                                            FunctionLikeParameterDefinition {
                                                comments: CommentGroup {
                                                    comments: [],
                                                },
                                                attributes: [],
                                                type_definition: String(
                                                    Keyword {
                                                        value: "string",
                                                        position: 49,
                                                    },
                                                ),
                                                ellipsis: None,
                                                variable: Variable {
                                                    position: 56,
                                                    name: "$foo",
                                                },
                                                default: None,
                                            },
                                        ],
                                        commas: [],
                                    },
                                    right_parenthesis: 60,
                                },
                                semicolon: 61,
                            },
                        ),
                        Method(
                            AbstractMethodDefinition {
                                comments: CommentGroup {
                                    comments: [],
                                },
                                attributes: [],
                                modifiers: ModifierGroupDefinition {
                                    position: 75,
                                    modifiers: [
                                        Public(
                                            Keyword {
                                                value: "public",
                                                position: 68,
                                            },
                                        ),
                                    ],
                                },
                                function: Keyword {
                                    value: "function",
                                    position: 75,
                                },
                                name: Identifier {
                                    position: 84,
                                    value: "doSomething",
                                },
                                templates: None,
                                parameters: FunctionLikeParameterListDefinition {
                                    comments: CommentGroup {
                                        comments: [],
                                    },
                                    left_parenthesis: 95,
                                    parameters: CommaSeparated {
                                        inner: [],
                                        commas: [],
                                    },
                                    right_parenthesis: 96,
                                },
                                return_type: FunctionLikeReturnTypeDefinition {
                                    colon: 97,
                                    type_definition: Void(
                                        Keyword {
                                            value: "void",
                                            position: 99,
                                        },
                                    ),
                                },
                                constraints: None,
                                semicolon: 103,
                            },
                        ),
                    ],
                    right_brace: 105,
                },
            },
        ),
        Class(
            ClassDefinition {
                comments: CommentGroup {
                    comments: [],
                },
                attributes: [],
                modifiers: ModifierGroupDefinition {
                    position: 114,
                    modifiers: [
                        Final(
                            Keyword {
                                value: "final",
                                position: 108,
                            },
                        ),
                    ],
                },
                class: Keyword {
                    value: "class",
                    position: 114,
                },
                name: Identifier {
                    position: 120,
                    value: "FooImpl",
                },
                templates: None,
                extends: None,
                implements: Some(
                    ClassDefinitionImplements {
                        implements: Keyword {
                            value: "implements",
                            position: 128,
                        },
                        interfaces: CommaSeparated {
                            inner: [
                                TemplatedIdentifier {
                                    name: Identifier {
                                        position: 139,
                                        value: "IFoo",
                                    },
                                    templates: None,
                                },
                            ],
                            commas: [],
                        },
                    },
                ),
                body: ClassDefinitionBody {
                    left_brace: 144,
                    members: [
                        ConcreteConstructor(
                            ConcreteConstructorDefinition {
                                comments: CommentGroup {
                                    comments: [],
                                },
                                attributes: [],
                                modifiers: ModifierGroupDefinition {
                                    position: 157,
                                    modifiers: [
                                        Public(
                                            Keyword {
                                                value: "public",
                                                position: 150,
                                            },
                                        ),
                                    ],
                                },
                                function: Keyword {
                                    value: "function",
                                    position: 157,
                                },
                                name: Identifier {
                                    position: 166,
                                    value: "__construct",
                                },
                                parameters: ConstructorParameterListDefinition {
                                    comments: CommentGroup {
                                        comments: [],
                                    },
                                    left_parenthesis: 177,
                                    parameters: CommaSeparated {
                                        inner: [
                                            ConstructorParameterDefinition {
                                                attributes: [],
                                                comments: CommentGroup {
                                                    comments: [],
                                                },
                                                modifiers: ModifierGroupDefinition {
                                                    position: 178,
                                                    modifiers: [],
                                                },
                                                type_definition: String(
                                                    Keyword {
                                                        value: "string",
                                                        position: 178,
                                                    },
                                                ),
                                                ellipsis: None,
                                                variable: Variable {
                                                    position: 185,
                                                    name: "$foo",
                                                },
                                                default: None,
                                            },
                                        ],
                                        commas: [],
                                    },
                                    right_parenthesis: 189,
                                },
                                body: BlockStatement {
                                    comments: CommentGroup {
                                        comments: [],
                                    },
                                    left_brace: 191,
                                    statements: [],
                                    right_brace: 212,
                                },
                            },
                        ),
                        ConcreteMethod(
                            ConcreteMethodDefinition {
                                comments: CommentGroup {
                                    comments: [
                                        Comment {
                                            position: 201,
                                            format: SingleLine,
                                            content: "// ...",
                                        },
                                    ],
                                },
                                attributes: [],
                                modifiers: ModifierGroupDefinition {
                                    position: 226,
                                    modifiers: [
                                        Public(
                                            Keyword {
                                                value: "public",
                                                position: 219,
                                            },
                                        ),
                                    ],
                                },
                                function: Keyword {
                                    value: "function",
                                    position: 226,
                                },
                                name: Identifier {
                                    position: 235,
                                    value: "doSomething",
                                },
                                templates: None,
                                parameters: FunctionLikeParameterListDefinition {
                                    comments: CommentGroup {
                                        comments: [],
                                    },
                                    left_parenthesis: 246,
                                    parameters: CommaSeparated {
                                        inner: [],
                                        commas: [],
                                    },
                                    right_parenthesis: 247,
                                },
                                return_type: FunctionLikeReturnTypeDefinition {
                                    colon: 248,
                                    type_definition: Void(
                                        Keyword {
                                            value: "void",
                                            position: 250,
                                        },
                                    ),
                                },
                                constraints: None,
                                body: BlockStatement {
                                    comments: CommentGroup {
                                        comments: [],
                                    },
                                    left_brace: 255,
                                    statements: [],
                                    right_brace: 276,
                                },
                            },
                        ),
                    ],
                    right_brace: 278,
                },
            },
        ),
        Function(
            FunctionDefinition {
                comments: CommentGroup {
                    comments: [
                        Comment {
                            position: 265,
                            format: SingleLine,
                            content: "// ...",
                        },
                    ],
                },
                attributes: [],
                function: Keyword {
                    value: "function",
                    position: 281,
                },
                name: Identifier {
                    position: 290,
                    value: "instantiate",
                },
                templates: Some(
                    TemplateGroupDefinition {
                        comments: CommentGroup {
                            comments: [],
                        },
                        less_than: 301,
                        members: CommaSeparated {
                            inner: [
                                TemplateDefinition {
                                    variance: Invaraint,
                                    name: Identifier {
                                        position: 302,
                                        value: "T",
                                    },
                                    constraint: SubType(
                                        Keyword {
                                            value: "as",
                                            position: 304,
                                        },
                                        Identifier(
                                            TemplatedIdentifier {
                                                name: Identifier {
                                                    position: 307,
                                                    value: "IFoo",
                                                },
                                                templates: None,
                                            },
                                        ),
                                    ),
                                },
                            ],
                            commas: [],
                        },
                        greater_than: 311,
                    },
                ),
                parameters: FunctionLikeParameterListDefinition {
                    comments: CommentGroup {
                        comments: [],
                    },
                    left_parenthesis: 312,
                    parameters: CommaSeparated {
                        inner: [
                            FunctionLikeParameterDefinition {
                                comments: CommentGroup {
                                    comments: [],
                                },
                                attributes: [],
                                type_definition: Class(
                                    Keyword {
                                        value: "class",
                                        position: 313,
                                    },
                                    TypeTemplateGroupDefinition {
                                        comments: CommentGroup {
                                            comments: [],
                                        },
                                        less_than: 318,
                                        members: CommaSeparated {
                                            inner: [
                                                Identifier(
                                                    TemplatedIdentifier {
                                                        name: Identifier {
                                                            position: 319,
                                                            value: "T",
                                                        },
                                                        templates: None,
                                                    },
                                                ),
                                            ],
                                            commas: [],
                                        },
                                        greater_than: 320,
                                    },
                                ),
                                ellipsis: None,
                                variable: Variable {
                                    position: 322,
                                    name: "$class",
                                },
                                default: None,
                            },
                            FunctionLikeParameterDefinition {
                                comments: CommentGroup {
                                    comments: [],
                                },
                                attributes: [],
                                type_definition: String(
                                    Keyword {
                                        value: "string",
                                        position: 330,
                                    },
                                ),
                                ellipsis: None,
                                variable: Variable {
                                    position: 337,
                                    name: "$foo",
                                },
                                default: None,
                            },
                        ],
                        commas: [
                            328,
                        ],
                    },
                    right_parenthesis: 341,
                },
                return_type: FunctionLikeReturnTypeDefinition {
                    colon: 342,
                    type_definition: Identifier(
                        TemplatedIdentifier {
                            name: Identifier {
                                position: 344,
                                value: "T",
                            },
                            templates: None,
                        },
                    ),
                },
                body: BlockStatement {
                    comments: CommentGroup {
                        comments: [],
                    },
                    left_brace: 346,
                    statements: [
                        Return(
                            Explicit {
                                comments: CommentGroup {
                                    comments: [],
                                },
                                return: Keyword {
                                    value: "return",
                                    position: 352,
                                },
                                expression: Some(
                                    ClassOperation(
                                        Initialization {
                                            comments: CommentGroup {
                                                comments: [],
                                            },
                                            new: Keyword {
                                                value: "new",
                                                position: 359,
                                            },
                                            class: Variable(
                                                Variable {
                                                    position: 363,
                                                    name: "$class",
                                                },
                                            ),
                                            generics: None,
                                            arguments: ArgumentListExpression {
                                                comments: CommentGroup {
                                                    comments: [],
                                                },
                                                left_parenthesis: 369,
                                                arguments: CommaSeparated {
                                                    inner: [
                                                        Value {
                                                            comments: CommentGroup {
                                                                comments: [],
                                                            },
                                                            value: Variable(
                                                                Variable {
                                                                    position: 370,
                                                                    name: "$foo",
                                                                },
                                                            ),
                                                        },
                                                    ],
                                                    commas: [],
                                                },
                                                right_parenthesis: 374,
                                            },
                                        },
                                    ),
                                ),
                                semicolon: 375,
                            },
                        ),
                    ],
                    right_brace: 377,
                },
            },
        ),
        Function(
            FunctionDefinition {
                comments: CommentGroup {
                    comments: [],
                },
                attributes: [],
                function: Keyword {
                    value: "function",
                    position: 380,
                },
                name: Identifier {
                    position: 389,
                    value: "test",
                },
                templates: None,
                parameters: FunctionLikeParameterListDefinition {
                    comments: CommentGroup {
                        comments: [],
                    },
                    left_parenthesis: 393,
                    parameters: CommaSeparated {
                        inner: [],
                        commas: [],
                    },
                    right_parenthesis: 394,
                },
                return_type: FunctionLikeReturnTypeDefinition {
                    colon: 395,
                    type_definition: Void(
                        Keyword {
                            value: "void",
                            position: 397,
                        },
                    ),
                },
                body: BlockStatement {
                    comments: CommentGroup {
                        comments: [],
                    },
                    left_brace: 402,
                    statements: [
                        Expression(
                            ExpressionStatement {
                                comments: CommentGroup {
                                    comments: [],
                                },
                                expression: AssignmentOperation(
                                    Assignment {
                                        comments: CommentGroup {
                                            comments: [],
                                        },
                                        left: Variable(
                                            Variable {
                                                position: 408,
                                                name: "$foo",
                                            },
                                        ),
                                        equals: 413,
                                        right: FunctionOperation(
                                            Call {
                                                comments: CommentGroup {
                                                    comments: [],
                                                },
                                                function: Identifier(
                                                    Identifier {
                                                        position: 415,
                                                        value: "instantiate",
                                                    },
                                                ),
                                                generics: Some(
                                                    GenericGroupExpression {
                                                        double_colon_less_than: 426,
                                                        types: CommaSeparated {
                                                            inner: [
                                                                Identifier(
                                                                    TemplatedIdentifier {
                                                                        name: Identifier {
                                                                            position: 429,
                                                                            value: "FooImpl",
                                                                        },
                                                                        templates: None,
                                                                    },
                                                                ),
                                                            ],
                                                            commas: [],
                                                        },
                                                        greater_than: 436,
                                                    },
                                                ),
                                                arguments: ArgumentListExpression {
                                                    comments: CommentGroup {
                                                        comments: [],
                                                    },
                                                    left_parenthesis: 437,
                                                    arguments: CommaSeparated {
                                                        inner: [
                                                            Value {
                                                                comments: CommentGroup {
                                                                    comments: [],
                                                                },
                                                                value: ClassOperation(
                                                                    ConstantFetch {
                                                                        comments: CommentGroup {
                                                                            comments: [],
                                                                        },
                                                                        class: Identifier(
                                                                            Identifier {
                                                                                position: 438,
                                                                                value: "FooImpl",
                                                                            },
                                                                        ),
                                                                        double_colon: 445,
                                                                        constant: Identifier {
                                                                            position: 447,
                                                                            value: "class",
                                                                        },
                                                                    },
                                                                ),
                                                            },
                                                            Value {
                                                                comments: CommentGroup {
                                                                    comments: [],
                                                                },
                                                                value: Literal(
                                                                    String(
                                                                        LiteralString {
                                                                            comments: CommentGroup {
                                                                                comments: [],
                                                                            },
                                                                            value: "'bar'",
                                                                            position: 454,
                                                                        },
                                                                    ),
                                                                ),
                                                            },
                                                        ],
                                                        commas: [
                                                            452,
                                                        ],
                                                    },
                                                    right_parenthesis: 459,
                                                },
                                            },
                                        ),
                                    },
                                ),
                                semicolon: 460,
                            },
                        ),
                        Expression(
                            ExpressionStatement {
                                comments: CommentGroup {
                                    comments: [],
                                },
                                expression: ObjectOperation(
                                    MethodCall {
                                        comments: CommentGroup {
                                            comments: [],
                                        },
                                        object: Variable(
                                            Variable {
                                                position: 467,
                                                name: "$foo",
                                            },
                                        ),
                                        arrow: 471,
                                        method: Identifier {
                                            position: 473,
                                            value: "doSomething",
                                        },
                                        generics: None,
                                        arguments: ArgumentListExpression {
                                            comments: CommentGroup {
                                                comments: [],
                                            },
                                            left_parenthesis: 484,
                                            arguments: CommaSeparated {
                                                inner: [],
                                                commas: [],
                                            },
                                            right_parenthesis: 485,
                                        },
                                    },
                                ),
                                semicolon: 486,
                            },
                        ),
                    ],
                    right_brace: 488,
                },
            },
        ),
    ],
    eof: 490,
}