somni 0.3.1

Somni scripting language and VM
Documentation
Program {
    items: [
        Function(
            Function {
                fn_token: Token {
                    kind: Identifier,
                    location: Location {
                        start: 0,
                        end: 2,
                    },
                },
                name: Token {
                    kind: Identifier,
                    location: Location {
                        start: 3,
                        end: 6,
                    },
                },
                opening_paren: Token {
                    kind: Symbol,
                    location: Location {
                        start: 6,
                        end: 7,
                    },
                },
                arguments: [
                    FunctionArgument {
                        name: Token {
                            kind: Identifier,
                            location: Location {
                                start: 7,
                                end: 8,
                            },
                        },
                        colon: Token {
                            kind: Symbol,
                            location: Location {
                                start: 8,
                                end: 9,
                            },
                        },
                        reference_token: None,
                        arg_type: TypeHint {
                            type_name: Token {
                                kind: Identifier,
                                location: Location {
                                    start: 10,
                                    end: 13,
                                },
                            },
                        },
                    },
                    FunctionArgument {
                        name: Token {
                            kind: Identifier,
                            location: Location {
                                start: 15,
                                end: 16,
                            },
                        },
                        colon: Token {
                            kind: Symbol,
                            location: Location {
                                start: 16,
                                end: 17,
                            },
                        },
                        reference_token: None,
                        arg_type: TypeHint {
                            type_name: Token {
                                kind: Identifier,
                                location: Location {
                                    start: 18,
                                    end: 21,
                                },
                            },
                        },
                    },
                ],
                closing_paren: Token {
                    kind: Symbol,
                    location: Location {
                        start: 21,
                        end: 22,
                    },
                },
                return_decl: Some(
                    ReturnDecl {
                        return_token: Token {
                            kind: Symbol,
                            location: Location {
                                start: 23,
                                end: 25,
                            },
                        },
                        return_type: TypeHint {
                            type_name: Token {
                                kind: Identifier,
                                location: Location {
                                    start: 26,
                                    end: 29,
                                },
                            },
                        },
                    },
                ),
                body: Body {
                    opening_brace: Token {
                        kind: Symbol,
                        location: Location {
                            start: 30,
                            end: 31,
                        },
                    },
                    statements: [
                        ImplicitReturn(
                            BinaryOperator {
                                name: Token {
                                    kind: Symbol,
                                    location: Location {
                                        start: 34,
                                        end: 35,
                                    },
                                },
                                operands: [
                                    Variable {
                                        variable: Token {
                                            kind: Identifier,
                                            location: Location {
                                                start: 32,
                                                end: 33,
                                            },
                                        },
                                    },
                                    StructLiteral {
                                        name: Token {
                                            kind: Identifier,
                                            location: Location {
                                                start: 36,
                                                end: 37,
                                            },
                                        },
                                        opening_brace: Token {
                                            kind: Symbol,
                                            location: Location {
                                                start: 38,
                                                end: 39,
                                            },
                                        },
                                        fields: [],
                                        closing_brace: Token {
                                            kind: Symbol,
                                            location: Location {
                                                start: 39,
                                                end: 40,
                                            },
                                        },
                                    },
                                ],
                            },
                        ),
                    ],
                    closing_brace: Token {
                        kind: Symbol,
                        location: Location {
                            start: 41,
                            end: 42,
                        },
                    },
                },
            },
        ),
    ],
}