Skip to content

sway-fmt-v2 formatting should use tokens directly from sway-parse #2072

@eureka-cpu

Description

@eureka-cpu

Instead of something like:

formatted_code.push_str("}\n");

we should do:

use sway_parse::token::Delimiter;

formatted_code.push_str(&format!("{}\n", Delimiter::Brace.as_close_char());

As seen in #2061

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions