Skip to content
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

Let Writer preserve format #900

Merged
merged 2 commits into from
Feb 11, 2022
Merged

Let Writer preserve format #900

merged 2 commits into from
Feb 11, 2022

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Feb 9, 2022

I found some RBS files has manually formatted definitions like:

type expr = IntExpr
          | StringExpr
          | FuncallExpr

def foo: (some, params,
          many: bool,
          keyword: String,
          ?parameters: bool) -> void

And I don't want to destroy the good format.

I add an option #preserve? to Writer to re-use the source text from which the ast is constructed.
The option works only for type decl and method definitions.

@soutaro soutaro merged commit 83329d8 into master Feb 11, 2022
@soutaro soutaro deleted the let-writer-presreve-format branch February 11, 2022 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant