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::TypeScript),\n        language: TestLanguage::TypeScript.get_language(),\n        text: r#\"\nclass TsClass {\n    constructor() {}\n\n    foo() {}\n\n    /**\n    * bar docs\n    */\n    bar() {}\n}\n\nexport function baz() {}\n\nexport default function baz2() {}\n            \"#.to_string(),\n    })"
---
Ok(
    [
        BlockLocationTree {
            block: BlockLocation {
                start_byte: 1,
                end_byte: 97,
                start_row: 1,
                start_col: 0,
                end_row: 10,
                end_col: 1,
            },
            children: [
                BlockLocationTree {
                    block: BlockLocation {
                        start_byte: 21,
                        end_byte: 37,
                        start_row: 2,
                        start_col: 4,
                        end_row: 2,
                        end_col: 20,
                    },
                    children: [],
                },
                BlockLocationTree {
                    block: BlockLocation {
                        start_byte: 43,
                        end_byte: 51,
                        start_row: 4,
                        start_col: 4,
                        end_row: 4,
                        end_col: 12,
                    },
                    children: [],
                },
                BlockLocationTree {
                    block: BlockLocation {
                        start_byte: 57,
                        end_byte: 95,
                        start_row: 6,
                        start_col: 4,
                        end_row: 9,
                        end_col: 12,
                    },
                    children: [],
                },
            ],
        },
        BlockLocationTree {
            block: BlockLocation {
                start_byte: 99,
                end_byte: 123,
                start_row: 12,
                start_col: 0,
                end_row: 12,
                end_col: 24,
            },
            children: [
                BlockLocationTree {
                    block: BlockLocation {
                        start_byte: 106,
                        end_byte: 123,
                        start_row: 12,
                        start_col: 7,
                        end_row: 12,
                        end_col: 24,
                    },
                    children: [],
                },
            ],
        },
        BlockLocationTree {
            block: BlockLocation {
                start_byte: 125,
                end_byte: 158,
                start_row: 14,
                start_col: 0,
                end_row: 14,
                end_col: 33,
            },
            children: [
                BlockLocationTree {
                    block: BlockLocation {
                        start_byte: 140,
                        end_byte: 158,
                        start_row: 14,
                        start_col: 15,
                        end_row: 14,
                        end_col: 33,
                    },
                    children: [],
                },
            ],
        },
    ],
)