microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.3.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

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
13pub mod formatter;
14