code-blocks-server 0.6.0

A tool to re-order your code
Documentation
---
source: code-blocks-server/tests/test_api.rs
expression: "code_blocks_server::get_subtrees(GetSubtreesArgs {\n        queries: get_query_strings(&TestLanguage::Python),\n        language: TestLanguage::Python.get_language(),\n        text: r#\"\n        @decor1\n        @decor2\n        class A:\n            ...\n           \n        class C:\n            \"\"\"class docstring\"\"\"\n        \n            def __init__(self):\n                pass\n        \n            #Vsrc\n            @staticmethod()\n            def foo():\n                \"\"\"method docstring\"\"\"\n                \n            #Vdst\n            def bar():\n                ...\n                \n        def func():\n            ...\n            \"#.to_string(),\n    })"
---
Ok(
    [
        BlockLocationTree {
            block: BlockLocation {
                start_byte: 9,
                end_byte: 65,
                start_row: 1,
                start_col: 8,
                end_row: 4,
                end_col: 15,
            },
            children: [
                BlockLocationTree {
                    block: BlockLocation {
                        start_byte: 41,
                        end_byte: 65,
                        start_row: 3,
                        start_col: 8,
                        end_row: 4,
                        end_col: 15,
                    },
                    children: [],
                },
            ],
        },
        BlockLocationTree {
            block: BlockLocation {
                start_byte: 86,
                end_byte: 385,
                start_row: 6,
                start_col: 8,
                end_row: 19,
                end_col: 19,
            },
            children: [
                BlockLocationTree {
                    block: BlockLocation {
                        start_byte: 150,
                        end_byte: 190,
                        start_row: 9,
                        start_col: 12,
                        end_row: 10,
                        end_col: 20,
                    },
                    children: [],
                },
                BlockLocationTree {
                    block: BlockLocation {
                        start_byte: 230,
                        end_byte: 307,
                        start_row: 13,
                        start_col: 12,
                        end_row: 15,
                        end_col: 38,
                    },
                    children: [
                        BlockLocationTree {
                            block: BlockLocation {
                                start_byte: 258,
                                end_byte: 307,
                                start_row: 14,
                                start_col: 12,
                                end_row: 15,
                                end_col: 38,
                            },
                            children: [],
                        },
                    ],
                },
                BlockLocationTree {
                    block: BlockLocation {
                        start_byte: 355,
                        end_byte: 385,
                        start_row: 18,
                        start_col: 12,
                        end_row: 19,
                        end_col: 19,
                    },
                    children: [],
                },
            ],
        },
        BlockLocationTree {
            block: BlockLocation {
                start_byte: 411,
                end_byte: 438,
                start_row: 21,
                start_col: 8,
                end_row: 22,
                end_col: 15,
            },
            children: [],
        },
    ],
)