A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::flow::FormatResult Struct Reference

The formatted text, and what it took to get there. More...

#include <cpp/a11/flow/format.h>

Public Attributes

std::string formatted
 The whole file as it should be.
 
bool changed = false
 
std::vector< Edit > edits
 One edit that turns the input into formatted, trimmed to the part that actually differs, so an editor applying it does not move the cursor or lose a selection over a file that only changed at the bottom.
 
std::vector< Diagnostic > diagnostics
 Why the file was left alone, where it was.
 

Detailed Description

The formatted text, and what it took to get there.

Member Data Documentation

◆ changed

bool a11::flow::FormatResult::changed = false

◆ diagnostics

std::vector<Diagnostic> a11::flow::FormatResult::diagnostics

Why the file was left alone, where it was.

◆ edits

std::vector<Edit> a11::flow::FormatResult::edits

One edit that turns the input into formatted, trimmed to the part that actually differs, so an editor applying it does not move the cursor or lose a selection over a file that only changed at the bottom.

Empty when nothing changed.

◆ formatted

std::string a11::flow::FormatResult::formatted

The whole file as it should be.

Equal to the input when nothing changed – and equal to the input, unchanged, when the file does not parse.


The documentation for this struct was generated from the following file: