microsoft/qdk
Publicmirrored fromhttps://github.com/microsoft/qdkAvailable
compiler/qsc_formatter/src/lib.rs
13lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | //! This module contains the Q# formatter, which can be used by calling |
| 5 | //! the format function available from this module. The formatting algorithm |
| 6 | //! uses the cooked and concrete tokens from the parser crate to create a |
| 7 | //! token stream of the given source code string. It then uses a sliding window |
| 8 | //! over this token stream to apply formatting rules when the selected tokens |
| 9 | //! match certain patterns. Formatting rules will generate text edit objects |
| 10 | //! when the format of the input string does not match the expected format, and |
| 11 | //! these edits are returned on using the formatter. |
| 12 | |
| 13 | pub mod formatter; |
| 14 | |