julia-vscode / DocumentFormat.jl

Auto-formatter for Julia
Other
62 stars 18 forks source link

AST transforms #23

Closed domluna closed 2 years ago

domluna commented 6 years ago

What are your thoughts on syntax transforming the AST prior to formatting?

A couple of examples:

1.

for i = 1:10


INTO

for i in 1:10

2.

@doc “doc” ->
function f()
    …
end

INTO

“””doc”””
function f()
    …
end

These would be based on style guidelines.

ZacLN commented 6 years ago

Personally I'm all for this sort of transformation, make a PR!