|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
#include "a11/flow/format.h"#include <algorithm>#include <cstddef>#include <optional>#include <string>#include <string_view>#include <utility>#include <vector>#include <absl/container/flat_hash_set.h>#include <absl/strings/ascii.h>#include <absl/strings/str_cat.h>#include "a11/flow/diagnostic.h"#include "a11/flow/lexer.h"#include "a11/flow/parser.h"#include "a11/flow/token.h"#include "a11/flow/vocabulary.h"Namespaces | |
| namespace | a11 |
| namespace | a11::flow |
Functions | |
| FormatResult | a11::flow::Format (std::string_view source, FormatOptions options={}) |
| Format Flow source. | |
| bool blank_before = false |
Whether one blank line goes above this one.
| std::string comment |
A comment that followed code on the same line.
| bool description = false |
The description, quoted exactly as it was written.
Whether this is a declaration's description, written on its own line.
Such a line sits inside a run of declarations without being one of them, so the columns of the run are worked out across it.
| std::string direction |
in, out or header, as written – a shouted IN stays shouted.
Empty for a field, which is the one of the three that opens with its name.
| bool field = false |
Whether this is a struct field.
Told apart from a port by more than its empty direction, because a run has to be all one kind and "is the direction empty" is a fact about this line rather than about what it is.
| int indent = 0 |
| TokenKind kind |
| std::string name |
The name and its colon, which travel together because they always do.
| std::optional<PortColumns> port |
| std::string text |
| std::string type |
The type and what follows it: string required, list[a11.Chunk] stream.