Skip to content

Merge remote-tracking branch 'upstream/main' into wasm32-wasi #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Jun 28, 2024

Conversation

kkebo
Copy link
Owner

@kkebo kkebo commented Jun 28, 2024

No description provided.

shawnhyam and others added 24 commits May 28, 2024 11:03
…ftlang#297>.

The basic idea here is to insert `enableFormatting` and `disableFormatting` tokens into the print stream when we enter or leave the selection. When formatting is enabled, we print out the tokens as usual. When formatting is disabled, we turn off any output until the next `enableFormatting` token. When that token is hit, we write the original source text from the location of the last `disableFormatting` to the current location.

Note that this means that all the APIs need the original source text to be passed in.

A `Selection` is represented as an enum with an `.infinite` case, and a `.ranges` case to indicate either selecting the entire file, or an array of start/end utf-8 offsets. The offset pairs are given with `Range<AbsolutePosition>`, matching the (now common) usage in swift-syntax.

For testing, allow marked text to use `⏩` and `⏪` to deliniate the start/end of a range of a selection.

The command line now takes an `--offsets` option of comma-separated "start:end" pairs to set the selection for formatting.
Pretty-print the `@_expose` with the correct spacing. It was formatted
as `@_expose(wasm,"foo")` instead of `@_expose(wasm, "foo")`.
…e-attribute

Fix `@_expose` attribute argument spacing
…indentation

Handle indented block comments with ASCII art correctly.
deleting in favor of the organization wide coc; this file present means that the repo is opt-ing out of that
contains old language; moving towards a unified strategy with CONTRIBUTING files.
adding in a contribution section from the removal of the contributing.md file
This change breaks up the PrettyPrint class into one piece that is
responsible for tracking the state of the pretty printing algorithm -
processing the tokens, tracking the break stack, comma delimited
region stack, etc.; and another piece that is responsible for assembling
the output and tracking the state of the output - current line, column
position, and indentation.
Update links for repositories moved to the swiftlang org on GitHub
Update README.md to mention that swift-format is included in Xcode 16
Split the PrettyPrint class into two pieces.
@kkebo kkebo self-assigned this Jun 28, 2024
@kkebo kkebo merged commit 33a6709 into wasm32-wasi Jun 28, 2024
2 checks passed
@kkebo kkebo deleted the merge-upstream-main branch June 28, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants