A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
format.cc File Reference
#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_map.h>
#include <absl/container/flat_hash_set.h>
#include <absl/strings/ascii.h>
#include <absl/strings/match.h>
#include <absl/strings/str_cat.h>
#include <nlohmann/json.hpp>
#include "a11/flow/diagnostic.h"
#include "a11/flow/emit_json.h"
#include "a11/flow/lexer.h"
#include "a11/flow/parser.h"
#include "a11/flow/token.h"
#include "a11/flow/vocabulary.h"
#include "a11/utf8.h"

Namespaces

namespace  a11
 
namespace  a11::flow
 

Functions

FormatResult a11::flow::Format (std::string_view source, FormatOptions options, CompilationLimits limits, CompilationBudget *budget)
 

Variable Documentation

◆ blank_before

bool blank_before = false

Whether one blank line goes above this one.

◆ comment

std::string comment

A comment that followed code on the same line.

◆ description

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.

◆ description_tail

std::string description_tail

◆ direction

std::string direction

in, out or header as written; empty for a shape field.

◆ dto

bool dto

◆ end

size_t end = 0

◆ field

bool field = false

Whether this line declares a struct field.

◆ indent

int indent = 0

◆ kind

TokenKind kind

◆ modifiers

std::vector<size_t> modifiers

◆ name

std::string name

The declaration name and its colon.

◆ port

std::optional<PortColumns> port

◆ text

std::string text

◆ type

std::string type

The type and what follows it: string required, list[a11.Chunk] stream.