|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
Namespaces | |
| namespace | catalogue |
| Action and type metadata supplied to Flow tooling. | |
| namespace | discover |
| Source scanning for project action declarations. | |
| namespace | graph |
| namespace | internal |
| namespace | interpreter |
| namespace | pattern |
| namespace | syntax |
| namespace | tool |
| namespace | vocabulary |
| Word sets and argument shapes shared by language frontends. | |
Classes | |
| struct | ActionDeclaration |
| Import an action interface and representable object metadata for generation. More... | |
| struct | CallOptions |
| Typed modifiers for an invocation expression. More... | |
| struct | CodeInfo |
Published diagnostic code metadata for documentation and a11 flow codes. More... | |
| struct | CoerceContext |
| What coercion needs besides the value and the type. More... | |
| class | CompilationBudget |
| One cooperative deadline and work counter for a compilation request. More... | |
| struct | CompilationLimits |
| Host-controlled bounds shared by parsing, linking and semantic analysis. More... | |
| class | CompiledProgram |
| One flow file, compiled: the plans, the graphs, and the tree they borrow. More... | |
| struct | CompleteResult |
| What may be written at an offset, and the word already typed there. More... | |
| struct | Description |
| What is at one offset, described. More... | |
| struct | Diagnostic |
| Flow problem rendered by the CLI, JSON and SARIF writers, and editors. More... | |
| struct | DocumentChange |
| The source edits committed atomically by one document transaction. More... | |
| struct | DocumentSymbol |
| One thing a document declares, and the things declared inside it. More... | |
| struct | DocumentSymbolHandle |
| A symbol's identity in one revision of an owning document. More... | |
| struct | DtoPlan |
One compiled struct: a shape a port may be typed with. More... | |
| struct | Edit |
One replacement of a span of source. An empty text is a deletion. More... | |
| struct | EvalContext |
| class | Expression |
| A native source expression whose emitter supplies required grouping. More... | |
| struct | ExpressionInfo |
| The statically known interface of one expression, borrowing its program. More... | |
| struct | FieldPlan |
One field of a struct, resolved. More... | |
| struct | Fix |
| Source edits supplied with a diagnostic. More... | |
| class | FlowBuilder |
| An implemented flow or interface, constructed with native typed helpers. More... | |
| struct | FlowPlan |
| One compiled flow: what a caller sees, and what the runtime will do. More... | |
| struct | FormatOptions |
| What the formatter is allowed to decide. More... | |
| struct | FormatPart |
| What an expression is evaluated against. More... | |
| struct | FormatResult |
| Formatted source, edits, and diagnostics. More... | |
| struct | FrameOptions |
| Execution-frame storage policy, independent of Flow semantics. More... | |
| struct | FrameStats |
| Requested frame capacity, including block headers and unused optional slots. More... | |
| struct | HeaderPlan |
| One declared header. More... | |
| class | HostBridge |
| What the process running a flow knows and the language does not. More... | |
| class | HostObject |
| A value only the host knows what to do with. More... | |
| struct | ImportSelection |
| struct | LexOptions |
| What to keep while lexing. More... | |
| struct | LexResult |
| Tokens, and what could not be read. More... | |
| class | LineIndex |
| Line and column lookup over one source text. More... | |
| struct | LinkedModule |
| Owning syntax and source snapshot for a linked module graph. More... | |
| class | ModuleDocument |
| Editable source, separate from immutable linked and executable snapshots. More... | |
| struct | ModuleGraphChange |
| A validated rename transaction over the supplied source snapshots. More... | |
| struct | ModuleMember |
| One visible namespace member and its linked identity. More... | |
| struct | ModuleRange |
| One original document's interval in linked analysis source. More... | |
| struct | ModuleSource |
| Source supplied by a host, with its canonical identity. More... | |
| class | NodeFragmentObject |
| A typed raw fragment carried through a fragment-view Flow pipeline. More... | |
| class | NodeReferenceObject |
| A typed reference carried through a fragment-view Flow pipeline. More... | |
| struct | ParseResult |
| The flows a file declares, and everything wrong with it. More... | |
| struct | PipelinePorts |
| The unique unsupplied input and unique output of a whole-stream invocation. More... | |
| struct | PortPlan |
| One declared port of a flow, resolved. More... | |
| struct | Position |
| Source position with a byte offset and 1-based line and column. More... | |
| struct | PreparedExpressions |
| Immutable, bounded literal preparation shared by execution activations. More... | |
| struct | Program |
| Every flow and shape one source file declares. More... | |
| struct | Proposal |
| One thing that may be written at an offset. More... | |
| struct | Range |
Half-open span of source, [start, end). More... | |
| struct | RelatedDiagnostic |
| Another source range explaining a diagnostic. More... | |
| struct | ResolvedFlow |
| One flow, resolved: its plan, its names, and what is wrong with it. More... | |
| struct | ResolveResult |
| A whole file, resolved. More... | |
| struct | RunOptions |
| struct | SchemaImport |
| The shapes a JSON Schema describes, and what would not fit. More... | |
| struct | SemanticToken |
| One nonoverlapping semantic span; string escapes have their own spans. More... | |
| struct | SingleItemAnalysis |
| struct | SingleItemFact |
| Evidence for transport selection, independent of declared cardinality. More... | |
| class | Statement |
| Typed statements for constructing executable bodies. More... | |
| struct | StepPlan |
One resolved statement in the a11 flow describe plan. More... | |
| struct | StringEscape |
| The source range of an escape inside a string token. More... | |
| class | StructBuilder |
| Construct a struct using the language's existing shape descriptor. More... | |
| struct | Symbol |
| One name, what it is, and what became of it. More... | |
| class | TextIndex |
| A document, and the offset arithmetic every editor protocol needs over it. More... | |
| struct | Token |
| One token: what it is, where it is, and what it holds. More... | |
| struct | TransportStats |
| Optional per-run counters; transport pumps count actual fiber entry. More... | |
| class | Value |
| An immutable Flow value with shared containers and long text. More... | |
| class | WindowBuffer |
| Builds immutable overlapping lists from append-only blocks. More... | |
Typedefs | |
| using | ModuleSources = absl::flat_hash_map< std::string, std::string > |
| using | ModuleResolver = std::function< absl::StatusOr< ModuleSource >(std::string_view reference, std::string_view importer)> |
| using | ModuleLimits = CompilationLimits |
| Limits applied before imported source is parsed or linked. | |
| using | FormatTemplate = std::vector< FormatPart > |
Functions | |
| CompleteResult | CompleteAt (std::string_view source, size_t offset, const catalogue::Catalogue &known, CompilationLimits limits, CompilationBudget *budget, const LinkedModule *linked) |
| std::string_view | ProposalKindName (ProposalKind kind) |
| The name of a proposal kind in the output format, in kebab case. | |
| CompleteResult | CompleteAt (std::string_view source, size_t offset, const catalogue::Catalogue &known=catalogue::Catalogue::Builtin(), CompilationLimits limits={}, CompilationBudget *absl_nullable budget=nullptr, const LinkedModule *absl_nullable linked=nullptr) |
Returns grammar and scope-aware proposals at offset in source. | |
| absl::StatusOr< PipelinePorts > | SelectPipelinePorts (const FlowPlan &flow, absl::Span< const std::string > supplied) |
| absl::StatusOr< const PortPlan * > | SelectPipelineStarterOutput (const FlowPlan &flow, absl::Span< const std::string > supplied) |
| The unique output of a call with every input supplied explicitly. | |
| std::vector< std::string_view > | FieldTypeNames (const FieldPlan &field) |
| Every type named by a field, including nested container parameters. | |
| void | MarkBinaryTypes (std::vector< DtoPlan > &types, CompilationBudget *budget) |
| std::string | CanonicalPayloadType (std::string_view type) |
| Canonical payload spelling for alias and generic equality. | |
| Refinement | RefinesType (std::string_view actual, std::string_view expected, const Program &program) |
| Compare payload types using native aliases and document shapes. | |
| std::string | HeaderBytes (const syntax::Constant &constant) |
| Encode a constant using the native action-header textual convention. | |
| absl::Status | MergeContract (FlowPlan &effective, const FlowPlan &contribution, const Program &program) |
| Conjoin compatible interfaces without changing executable identity. | |
| absl::Status | CheckImplementation (const FlowPlan &actual, const FlowPlan &declared, const Program &program) |
| Validate the actual implementation against every declared obligation. | |
| void | MarkBinaryTypes (std::vector< DtoPlan > &types, CompilationBudget *absl_nullable budget=nullptr) |
| Propagate byte payloads through the shape dependency graph. | |
| std::string_view | SeverityName (Severity severity) |
| The spelling of a severity in the output formats. | |
| std::string_view | FamilyName (Family family) |
| The spelling of a family in the output formats. | |
| Severity | SeverityFromName (std::string_view name) |
Severity for a name from the output formats, or kError if unknown. | |
| Family | FamilyFromName (std::string_view name) |
Family for a name from the output formats, or kSyntax if unknown. | |
| const Diagnostic *absl_nullable | FirstError (absl::Span< const Diagnostic > diagnostics) |
The first error in diagnostics, or nullptr if none is an error. | |
| absl::Span< const CodeInfo > | KnownCodes () |
| Every diagnostic code the language can produce, sorted by code. | |
| const CodeInfo *absl_nullable | FindCode (std::string_view code) |
The entry for a code, or nullptr if nothing publishes it. | |
| void | SortDiagnostics (std::vector< Diagnostic > &diagnostics) |
| Sorts diagnostics into the order every frontend presents them in: by position, then by code, so two runs over the same file agree byte for byte. | |
| absl::StatusOr< std::string > | DeclarationSource (const FlowPlan &plan) |
| Emit a declaration without introducing an action-layer dependency. | |
| nlohmann::json | DiagnosticToJsonValue (const Diagnostic &diagnostic) |
| One diagnostic, as it appears in the envelope. | |
| Diagnostic | DiagnosticFromJsonValue (const nlohmann::json &value) |
| Reads a diagnostic, ignoring unknown fields and defaulting missing ones. | |
| nlohmann::json | DiagnosticsToJsonValue (std::string_view source, absl::Span< const Diagnostic > diagnostics) |
The flow.diagnostics/v1 envelope, with source and severity counts. | |
| std::string | DiagnosticsToJson (std::string_view source, absl::Span< const Diagnostic > diagnostics) |
| The envelope, serialised with a trailing newline and two-space indent. | |
| nlohmann::json | CodesToJsonValue () |
The published code table, as flow.codes/v1. | |
| nlohmann::json | VocabularyToJsonValue () |
The language word sets as flow.vocabulary/v1. | |
| nlohmann::json | DiagnosticsToSarifValue (std::string_view source, absl::Span< const Diagnostic > diagnostics) |
| A SARIF 2.1.0 log for one file, with rule metadata from [KnownCodes]. | |
| std::string | DiagnosticsToSarif (std::string_view source, absl::Span< const Diagnostic > diagnostics) |
| The SARIF log, serialised with a trailing newline. | |
| nlohmann::json | ConstantToJsonValue (const syntax::Constant &constant) |
| A constant as the syntax format writes it. | |
| nlohmann::json | NodeToJsonValue (const syntax::Node &node) |
| A syntax node and its subtree. | |
| nlohmann::json | SyntaxToJsonValue (std::string_view source, const ParseResult &result) |
The flow.syntax/v1 envelope, including partial trees and diagnostics. | |
| std::string | SyntaxToJson (std::string_view source, const ParseResult &result) |
| The envelope, serialised with a trailing newline and two-space indent. | |
| nlohmann::json | TokensToJsonValue (std::string_view source_name, std::string_view source) |
The flow.tokens/v1 envelope, with token kinds and semantic classes. | |
| std::string | TokensToJson (std::string_view source_name, std::string_view source) |
| The envelope, serialised with a trailing newline and two-space indent. | |
| nlohmann::json | FormatToJsonValue (const FormatResult &result) |
The flow.format/v1 envelope: the formatted text, and what it took. | |
| nlohmann::json | CompletionsToJsonValue (const CompleteResult &result) |
The flow.completions/v1 envelope: what may be written at an offset. | |
| nlohmann::json | PlanToJsonValue (std::string_view source_name, const Program &program) |
The flow.plan/v1 envelope for resolved flows. | |
| nlohmann::json | DtoToJsonValue (const DtoPlan &dto, const Program *absl_nullable program=nullptr) |
| A resolved shape. | |
| std::string | PlanToJson (std::string_view source_name, const Program &program) |
| The envelope, serialised with a trailing newline and two-space indent. | |
| std::string | DiagnosticToText (std::string_view source, const Diagnostic &diagnostic) |
path:line:column: severity: message [code] on one line. | |
| std::string | FileModuleIdentity (std::string_view reference) |
| Lexical source identity; normalizing it performs no target-path inspection. | |
| ModuleResolver | FileModuleResolver (size_t max_bytes=8 *1024 *1024, ModuleSources overrides={}, std::vector< std::string > approved_roots={}) |
| Filesystem imports confined to explicitly approved roots without symlinks. | |
| FormatResult | Format (std::string_view source, FormatOptions options, CompilationLimits limits, CompilationBudget *budget) |
| FormatResult | Format (std::string_view source, FormatOptions options={}, CompilationLimits limits={}, CompilationBudget *absl_nullable budget=nullptr) |
| Formats Flow source with stable whitespace and equivalent syntax. | |
| std::string | FragmentStartPattern () |
| Native document-start pattern used by host-string injectors. | |
| absl::Span< const SyntaxTarget > | SyntaxTargets () |
| Every target, for a command that offers a choice of them. | |
| std::string_view | SyntaxTargetName (SyntaxTarget target) |
The name a target is asked for by: sublime. | |
| bool | SyntaxTargetFromName (std::string_view name, SyntaxTarget &target) |
A target from its name, or nullopt. | |
| std::string_view | SyntaxTargetPath (SyntaxTarget target) |
| Where the generated file belongs, relative to the repository root. | |
| std::string | GenerateSyntax (SyntaxTarget target) |
| Generates the target grammar from the Flow vocabulary. | |
| std::string_view | SemanticKindName (SemanticKind kind) |
| The name of a semantic kind in the output formats, in kebab case. | |
| SemanticKind | SemanticKindFromName (std::string_view name) |
The kind a name refers to, or kIdentifier if it is not one. | |
| std::vector< SemanticToken > | Highlight (absl::Span< const Token > tokens) |
| Classify a token stream. | |
| void | RefinePorts (std::string_view source, std::vector< SemanticToken > &semantic) |
| Refine lexical tokens using parsed type positions and resolved bindings. | |
| std::vector< Diagnostic > | Inspect (std::string_view source, const ParseResult &parsed, const ResolveResult &resolved) |
| Reports nonfatal Flow diagnostics from parsed and resolved source. | |
| LexResult | Lex (std::string_view source, LexOptions options={}) |
Lexes Flow source, ending with one end token. | |
| LinkedModule | LinkModules (std::string source, std::string identity, const ModuleSources &sources, ModuleResolver resolver, ModuleLimits limits, CompilationBudget *budget) |
| LinkedModule | LinkModules (std::string source, std::string identity, const ModuleSources &sources={}, ModuleResolver resolver={}, ModuleLimits limits={}, CompilationBudget *absl_nullable budget=nullptr) |
| Link lexical imports and private dependencies using host-supplied sources. | |
| std::string | WordMarkdown (std::string_view name, vocabulary::WordRole role) |
| One word or mark of the language, written out as reference: what it does, what it takes, how it behaves, and a line of Flow using it. | |
| std::string | StageMarkdown (std::string_view name) |
| A pipeline stage, written out as reference. | |
| std::string | BuiltinMarkdown (std::string_view name) |
| A built-in function, the same way. | |
| std::string | ActionMarkdown (const catalogue::ActionInfo &action) |
| An action, written out as the Markdown a reader wants to see: what it does, then every port it has. | |
| std::string | InvocationNote (std::string_view mode) |
| const syntax::CallExpression * | CallAt (const ParseResult &parsed, size_t offset) |
| std::string | PortMarkdown (std::string_view name, std::string_view type, bool required, bool unary, std::string_view description) |
| One port, written out as the Markdown a reader wants beside its name. | |
| std::string | FlowMarkdown (const FlowPlan &flow) |
| A flow of the document, written out the same way: what it does, then its ports and which direction each runs. | |
| std::string | ShapeMarkdown (const DtoPlan &shape) |
| A struct, written out the same way: how many fields, then each of them. | |
| std::string_view | SymbolClassName (SymbolClass kind) |
| Range | Widened (const LineIndex &lines, const Range &range, const Range &selection) |
| Expands a symbol range to include its selection. | |
| Range | ConstructRange (const LineIndex &lines, absl::Span< const Token > tokens, const syntax::Location &opened, const Range &selection) |
| std::vector< DocumentSymbol > | Symbols (std::string_view source, CompilationLimits limits, CompilationBudget *budget) |
| Description | Describe (std::string_view source, size_t offset, const catalogue::Catalogue &known, CompilationLimits limits, CompilationBudget *budget, const LinkedModule *linked) |
| std::vector< DocumentSymbol > | Symbols (std::string_view source, CompilationLimits limits={}, CompilationBudget *absl_nullable budget=nullptr) |
| Every symbol a document declares, nested as it is written. | |
| Description | Describe (std::string_view source, size_t offset, const catalogue::Catalogue &known=catalogue::Catalogue::Builtin(), CompilationLimits limits={}, CompilationBudget *absl_nullable budget=nullptr, const LinkedModule *absl_nullable linked=nullptr) |
What is at offset, and where it came from. | |
| bool | OffsetBasisFromName (std::string_view name, OffsetBasis &basis) |
The basis a request named, or kBytes when it named none. | |
| std::string_view | OffsetBasisName (OffsetBasis basis) |
| The name of a basis, for a message and for the JSON. | |
| void | RebaseToUtf16 (nlohmann::json &answer, const TextIndex &index) |
| Rewrite every document offset in an answer from bytes into UTF-16 units. | |
| void | RebaseToUtf16 (nlohmann::json &answer, const TextIndex &index, const absl::flat_hash_map< std::string, TextIndex > &documents) |
| Rebase each document with its own pinned source index. | |
| ParseResult | Parse (std::string_view source, CompilationLimits limits, CompilationBudget *budget) |
| absl::StatusOr< syntax::TypeExpression > | ParseTypeExpression (std::string_view source, CompilationLimits limits, CompilationBudget *budget) |
| ParseResult | ParseTokens (std::string_view source, absl::Span< const Token > tokens, std::vector< Diagnostic > diagnostics, CompilationLimits limits, CompilationBudget *budget) |
| ParseResult | Parse (std::string_view source, CompilationLimits limits={}, CompilationBudget *absl_nullable budget=nullptr) |
| Parses Flow source into a recoverable tree and diagnostics. | |
| absl::StatusOr< syntax::TypeExpression > | ParseTypeExpression (std::string_view source, CompilationLimits limits={}, CompilationBudget *absl_nullable budget=nullptr) |
| Parse a standalone type with the same grammar and limits as a declaration. | |
| ParseResult | ParseTokens (std::string_view source, absl::Span< const Token > tokens, std::vector< Diagnostic > diagnostics, CompilationLimits limits={}, CompilationBudget *absl_nullable budget=nullptr) |
| Parse an already-lexed stream, sharing the lex diagnostics. | |
| std::string_view | SymbolKindName (SymbolKind kind) |
| The name of a symbol kind, for a message and for the JSON. | |
| ResolveResult | Resolve (std::string_view source, const ParseResult &parsed, bool build_graph, const Program *context, CompilationLimits limits, CompilationBudget *budget) |
| ResolveResult | Resolve (std::string_view source, const ParseResult &parsed, bool build_graph=false, const Program *absl_nullable context=nullptr, CompilationLimits limits={}, CompilationBudget *absl_nullable budget=nullptr) |
| Resolves names, ports, scopes, node maps, and types in a parsed program. | |
| absl::StatusOr< actions::ActionHandler > | MakeHandler (std::shared_ptr< const CompiledProgram > program, std::string_view flow, RunOptions options={}) |
The action handler that runs one flow of program. | |
| absl::StatusOr< actions::ActionHandler > | MakeEntryHandler (std::shared_ptr< const CompiledProgram > program, RunOptions options={}) |
| The action handler that runs the program's entry flow. | |
| absl::StatusOr< actions::ActionSchema > | FlowSchema (const FlowPlan &plan, const Program *absl_nullable shapes=nullptr) |
| The [actions::ActionSchema] a flow presents. | |
| ActionDeclaration | DeclareAction (const actions::ActionSchema &schema) |
| absl::StatusOr< actions::ActionSchema > | FlowSchema (const FlowPlan &plan, const Program *shapes) |
| nlohmann::json | DtoToJsonSchema (const DtoPlan &dto, const Program &program) |
| Converts a Flow shape to JSON Schema Draft 2020-12. | |
| SchemaImport | JsonSchemaToDtos (const nlohmann::json &schema, std::string_view name) |
Imports shapes from schema, using name when the root has no name. | |
| std::string | DtoToFlow (const DtoPlan &dto) |
| Renders one shape as formatted Flow source. | |
| absl::Span< const std::string_view > | Methods () |
Every method [Handle] knows, in the order --help lists them. | |
| std::string_view | MethodSummary (std::string_view method) |
What a method takes and gives back, one line, for --help. | |
| nlohmann::json | Handle (const nlohmann::json &request, ModuleResolver resolver={}, CompilationLimits limits={}) |
| Handles one language service request and returns its JSON envelope. | |
| bool | CheckSingleItemStructure (const graph::FlowGraph &flow) |
| Validate graph structure independently of transport candidate discovery. | |
| SingleItemAnalysis | AnalyseSingleItems (const graph::FlowGraph &flow, CompilationBudget *budget=nullptr, size_t max_work=200000) |
| Infer and verify prefix emission bounds, with a bounded optional work quota. | |
| nlohmann::json | SingleItemsToJson (const graph::FlowGraph &flow, const SingleItemAnalysis &analysis, bool enabled) |
| Explain transport decisions without changing the public source plan. | |
| absl::Duration | SecondsDuration (double total) |
| A duration of total seconds, including negative and infinite values. | |
| std::optional< absl::Duration > | ParseDuration (std::string_view text) |
| Parse duration text, including compound units and bare seconds. | |
| std::optional< absl::Time > | ParseTime (std::string_view text) |
| Parse an instant as RFC 3339 text or a UTC calendar date. | |
| std::string_view | KindName (TokenKind kind) |
The name of a kind, as a11.flow.lexer spells it. | |
| TokenKind | KindFromName (std::string_view name) |
The kind a name from [KindName] refers to, or kBad if it is not one. | |
| bool | operator== (const Value &left, const Value &right) |
| std::unique_ptr< HostBridge > | NativeHostBridge () |
| A host bridge backed by the C++ serialization registry. | |
| std::optional< Value > | LookupOptional (const Value &value, const Value &key) |
| absl::StatusOr< Value > | LookupChecked (const Value &value, const Value &key) |
| Value | Lookup (const Value &value, const Value &key) |
Take key out of value: a mapping key, an index, or a field. | |
| bool | Truthy (const Value &value) |
Whether value counts as true, as an if and a where decide it. | |
| std::string | AsText (const Value &value) |
value as text, the way the text stage and builtin render it. | |
| Value | AsNumber (const Value &value) |
value as a number, or zero when there is nothing to read. | |
| std::optional< std::int64_t > | ExactInt64 (const Value &value) |
| double | AsDouble (const Value &value) |
AsNumber as a double, for the places that only want the magnitude. | |
| Value | AsHole (pattern::HoleType type, std::string_view text) |
| One hole's text, read as the hole said to read it. | |
| absl::StatusOr< Value > | MatchPattern (std::string_view pattern, std::string_view subject) |
The fields a pattern pulls out of subject, or null where it does not fit. | |
| Value | MatchCompiled (const pattern::Pattern &pattern, std::string_view subject) |
| The same, against a pattern already compiled. | |
| Value | AsJson (const Value &value) |
| Text parsed as JSON; anything already decoded is left alone. | |
| Value | Truncate (const Value &value, std::int64_t size) |
The first size of a value: characters, bytes, elements or pairs. | |
| std::string | JsonText (const Value &value) |
| Renders JSON with sorted keys, spaced separators, and escaped non-ASCII. | |
| double | DurationSeconds (absl::Duration value) |
| A duration as a number of seconds, for every duration there is. | |
| absl::Duration | AsDuration (const Value &value) |
| A duration from a duration, from written text, or from seconds. | |
| absl::Time | AsTime (const Value &value) |
| An instant from an instant, from RFC 3339 text, or from epoch seconds. | |
| std::string | DurationText (absl::Duration value, std::string_view spec={}) |
A duration as text: 1m30s by default, or one unit when spec names one. | |
| std::string | TimeText (absl::Time value, std::string_view spec={}) |
An instant as text: RFC 3339 in UTC, a strftime pattern, or epoch. | |
| FormatTemplate | CompileStrformat (std::string_view text) |
| std::string | StrformatCompiled (const FormatTemplate &parts, absl::Span< const Value > arguments) |
| std::string | Strformat (const Value &format, absl::Span< const Value > arguments) |
format with each % conversion replaced by one of arguments. | |
| absl::StatusOr< Value > | CallBuiltin (std::string_view name, absl::Span< const Value > arguments, HostBridge *absl_nullable bridge, const PreparedExpressions *prepared) |
| absl::StatusOr< Value > | CoerceShape (const DtoPlan &shape, const Value &value, const CoerceContext &context) |
Make value a value of shape: fill its defaults, check its bounds, and coerce every field to the type the shape gives it. | |
| absl::StatusOr< Value > | Coerce (const Value &value, const syntax::TypeExpression &type, const CoerceContext &context) |
Make value a value of the type type names. | |
| int | Order (const Value &left, const Value &right) |
| Where two values sit relative to one another: -1, 0 or 1. | |
| absl::StatusOr< Value > | Add (const Value &left, const Value &right) |
left + right, as an expression means it. | |
| absl::StatusOr< Value > | Evaluate (const syntax::Node &node, const EvalContext &context) |
| Evaluate one expression. | |
| Value | StatusRecord (const absl::Status &status) |
| A status as the record a flow sees when it looks at an outcome. | |
| Value | FailureRecord (const absl::Status &status, Value item, std::int64_t seq) |
| A tolerated stage failure, with the original item and zero-based position. | |
| std::optional< absl::StatusCode > | StatusCodeOf (const Value &value) |
The canonical code value names, by name or by number, or nullopt. | |
| absl::Status | StatusOfRecord (const Value &record) |
| The status a record like the one above describes. | |
| absl::StatusOr< Value > | CallBuiltin (std::string_view name, absl::Span< const Value > arguments, HostBridge *absl_nullable bridge, const PreparedExpressions *absl_nullable prepared=nullptr) |
| Call one of the language's fixed functions. | |
Variables | |
| constexpr std::string_view | kCompletionsFormat = "flow.completions/v1" |
The format field of the completions envelope. | |
| constexpr std::string_view | kDiagnosticsFormat = "flow.diagnostics/v1" |
| Envelope format identifiers. Readers ignore unknown fields in a version. | |
| constexpr std::string_view | kCodesFormat = "flow.codes/v1" |
| constexpr std::string_view | kSyntaxFormat = "flow.syntax/v1" |
| constexpr std::string_view | kTokensFormat = "flow.tokens/v1" |
| constexpr std::string_view | kVocabularyFormat = "flow.vocabulary/v1" |
| constexpr std::string_view | kFormatFormat = "flow.format/v1" |
| constexpr std::string_view | kSymbolsFormat = "flow.symbols/v1" |
The format field of the symbols envelope. | |
| constexpr std::string_view | kHoverFormat = "flow.hover/v1" |
The format field of the hover envelope. | |
| constexpr std::string_view | kDefinitionFormat = "flow.definition/v1" |
The format field of the definition envelope. | |
| constexpr std::string_view | kPlanFormat = "flow.plan/v1" |
The format field of the plan envelope. | |
| constexpr size_t | kQueueDepth = 8 |
| Maximum values a pipe may hold ahead of its reader. | |
| constexpr std::string_view | kSchemaFormat = "flow.schema/v1" |
The format field of the schema envelope. | |
| constexpr std::string_view | kFlowTypeKey = "x-a11-type" |
| The extension key that says which Flow type a string really is. | |
| constexpr std::string_view | kFlowOrderKey = "x-a11-order" |
| Extension key preserving a shape's field declaration order. | |
| using a11::flow::FormatTemplate = typedef std::vector<FormatPart> |
| using a11::flow::ModuleLimits = typedef CompilationLimits |
Limits applied before imported source is parsed or linked.
| using a11::flow::ModuleResolver = typedef std::function<absl::StatusOr<ModuleSource>( std::string_view reference, std::string_view importer)> |
| using a11::flow::ModuleSources = typedef absl::flat_hash_map<std::string, std::string> |
|
strong |
|
strong |
Diagnostic category used by editors and build gates.
|
strong |
|
strong |
Completion categories published by flow.completions/v1.
|
strong |
|
strong |
What a token means where it stands, which is what a reader colours by.
Finer-grained than the grammar needs: a word is significant or not to a parser, but a reader wants to tell a port type from a pipeline stage from a status code, because that is the distinction they are making. These are the names the output format uses and the names an editor maps to its own palette, so they are part of the contract.
|
strong |
Severity of a Flow diagnostic.
| Enumerator | |
|---|---|
| kError | Compilation fails. |
| kWarning | Compilation succeeds, but behavior may differ from the source's intent. |
| kWeakWarning | Compilation succeeds, but a source element has no effect. |
| kInformation | Non-blocking information. |
|
strong |
Moving around a document: what is under the caret, what the file declares, and where a name was bound.
Navigation uses the parser and resolver so hover, completion, diagnostics, and editor integrations assign the same role and binding to each name. What a thing is, which is what an editor turns into an icon.
Serialized in flow.symbols/v1 and flow.hover/v1.
|
strong |
What a name means inside a flow.
| Enumerator | |
|---|---|
| kSink | A transfer handle: writable continuation, never payload or a source. |
| kInputPort | An |
| kOutputPort | An See |
| kHeader | A header, under its alias. |
| kCall | A |
| kNode | A node of the flow's own, from |
| kNodeMap | A node map, from |
| kBarrier | A bound |
| kLoopVariable | A |
| kCarry | What a |
| kValue | One value, read from a stream and given a name by Read as a value wherever an expression is accepted. It is never a write target. |
|
strong |
An editor definition the language can write for itself.
|
strong |
What kind of thing a token is.
The same set a11.flow.lexer produces, under the same names – [KindName] returns exactly the strings the Python lexer uses – with one addition: a comment is a token here. The Python lexer drops comments because a parser has no use for them; a highlighter and a formatter do, and one lexer that keeps them serves all three.
| std::string a11::flow::ActionMarkdown | ( | const catalogue::ActionInfo & | action | ) |
An action, written out as the Markdown a reader wants to see: what it does, then every port it has.
Shared by hover and completion.
left + right, as an expression means it.
For | sum, | avg and | fold, which add values the way + does: numbers as numbers, durations as durations, an instant and a duration as the shifted instant, and text as text.
| SingleItemAnalysis a11::flow::AnalyseSingleItems | ( | const graph::FlowGraph & | flow, |
| CompilationBudget * | budget, | ||
| size_t | max_work | ||
| ) |
Infer and verify prefix emission bounds, with a bounded optional work quota.
| double a11::flow::AsDouble | ( | const Value & | value | ) |
AsNumber as a double, for the places that only want the magnitude.
| absl::Duration a11::flow::AsDuration | ( | const Value & | value | ) |
A duration from a duration, from written text, or from seconds.
| Value a11::flow::AsHole | ( | pattern::HoleType | type, |
| std::string_view | text | ||
| ) |
One hole's text, read as the hole said to read it.
Text parsed as JSON; anything already decoded is left alone.
value as a number, or zero when there is nothing to read.
Integral where the value was integral, so d of a count is the count.
| std::string a11::flow::AsText | ( | const Value & | value | ) |
value as text, the way the text stage and builtin render it.
| absl::Time a11::flow::AsTime | ( | const Value & | value | ) |
An instant from an instant, from RFC 3339 text, or from epoch seconds.
| std::string a11::flow::BuiltinMarkdown | ( | std::string_view | name | ) |
A built-in function, the same way.
| const syntax::CallExpression * a11::flow::CallAt | ( | const ParseResult & | parsed, |
| size_t | offset | ||
| ) |
| absl::StatusOr< Value > a11::flow::CallBuiltin | ( | std::string_view | name, |
| absl::Span< const Value > | arguments, | ||
| HostBridge *absl_nullable | bridge, | ||
| const PreparedExpressions *absl_nullable | prepared = nullptr |
||
| ) |
Call one of the language's fixed functions.
Public because the strformat stage is the one-value shorthand for the builtin and must not become a second implementation of it.
| absl::StatusOr< Value > a11::flow::CallBuiltin | ( | std::string_view | name, |
| absl::Span< const Value > | arguments, | ||
| HostBridge *absl_nullable | bridge, | ||
| const PreparedExpressions * | prepared | ||
| ) |
| std::string a11::flow::CanonicalPayloadType | ( | std::string_view | type | ) |
Canonical payload spelling for alias and generic equality.
| absl::Status a11::flow::CheckImplementation | ( | const FlowPlan & | actual, |
| const FlowPlan & | declared, | ||
| const Program & | program | ||
| ) |
Validate the actual implementation against every declared obligation.
| bool a11::flow::CheckSingleItemStructure | ( | const graph::FlowGraph & | flow | ) |
Validate graph structure independently of transport candidate discovery.
| nlohmann::json a11::flow::CodesToJsonValue | ( | ) |
The published code table, as flow.codes/v1.
| absl::StatusOr< Value > a11::flow::Coerce | ( | const Value & | value, |
| const syntax::TypeExpression & | type, | ||
| const CoerceContext & | context | ||
| ) |
Make value a value of the type type names.
A built-in name coerces the way the matching builtin does; a shape the program declared is validated against, field by field; a tag or a mimetype goes to the host, which is the only place that knows what has been registered.
| absl::StatusOr< Value > a11::flow::CoerceShape | ( | const DtoPlan & | shape, |
| const Value & | value, | ||
| const CoerceContext & | context | ||
| ) |
Make value a value of shape: fill its defaults, check its bounds, and coerce every field to the type the shape gives it.
The one implementation of what a shape means. The resolver checks what it can before anything runs – a key the shape does not have, a constant of the wrong kind – and this checks the rest, when a value actually arrives. A failure names the field it was about, by path (parent.tags[2]), because a flow's data comes from somewhere else and "invalid" without a path is a message nobody can act on.
A key the shape does not have is dropped, not refused: extra data is how {...it, ..} is useful, and a producer that sends more than a reader declared has done nothing wrong. Writing such a key out by hand is a different thing and the resolver says so.
| FormatTemplate a11::flow::CompileStrformat | ( | std::string_view | text | ) |
| CompleteResult a11::flow::CompleteAt | ( | std::string_view | source, |
| size_t | offset, | ||
| const catalogue::Catalogue & | known, | ||
| CompilationLimits | limits, | ||
| CompilationBudget * | budget, | ||
| const LinkedModule * | linked | ||
| ) |
| CompleteResult a11::flow::CompleteAt | ( | std::string_view | source, |
| size_t | offset, | ||
| const catalogue::Catalogue & | known = catalogue::Catalogue::Builtin(), |
||
| CompilationLimits | limits = {}, |
||
| CompilationBudget *absl_nullable | budget = nullptr, |
||
| const LinkedModule *absl_nullable | linked = nullptr |
||
| ) |
Returns grammar and scope-aware proposals at offset in source.
Incomplete source produces narrower proposals. Source without a flow is treated as a flow body. known supplies available actions and types.
| nlohmann::json a11::flow::CompletionsToJsonValue | ( | const CompleteResult & | result | ) |
The flow.completions/v1 envelope: what may be written at an offset.
| nlohmann::json a11::flow::ConstantToJsonValue | ( | const syntax::Constant & | constant | ) |
A constant as the syntax format writes it.
| Range a11::flow::ConstructRange | ( | const LineIndex & | lines, |
| absl::Span< const Token > | tokens, | ||
| const syntax::Location & | opened, | ||
| const Range & | selection | ||
| ) |
| absl::StatusOr< std::string > a11::flow::DeclarationSource | ( | const FlowPlan & | plan | ) |
Emit a declaration without introducing an action-layer dependency.
| ActionDeclaration a11::flow::DeclareAction | ( | const actions::ActionSchema & | schema | ) |
| Description a11::flow::Describe | ( | std::string_view | source, |
| size_t | offset, | ||
| const catalogue::Catalogue & | known, | ||
| CompilationLimits | limits, | ||
| CompilationBudget * | budget, | ||
| const LinkedModule * | linked | ||
| ) |
| Description a11::flow::Describe | ( | std::string_view | source, |
| size_t | offset, | ||
| const catalogue::Catalogue & | known = catalogue::Catalogue::Builtin(), |
||
| CompilationLimits | limits = {}, |
||
| CompilationBudget *absl_nullable | budget = nullptr, |
||
| const LinkedModule *absl_nullable | linked = nullptr |
||
| ) |
What is at offset, and where it came from.
| Diagnostic a11::flow::DiagnosticFromJsonValue | ( | const nlohmann::json & | value | ) |
Reads a diagnostic, ignoring unknown fields and defaulting missing ones.
| std::string a11::flow::DiagnosticsToJson | ( | std::string_view | source, |
| absl::Span< const Diagnostic > | diagnostics | ||
| ) |
The envelope, serialised with a trailing newline and two-space indent.
| nlohmann::json a11::flow::DiagnosticsToJsonValue | ( | std::string_view | source, |
| absl::Span< const Diagnostic > | diagnostics | ||
| ) |
The flow.diagnostics/v1 envelope, with source and severity counts.
| std::string a11::flow::DiagnosticsToSarif | ( | std::string_view | source, |
| absl::Span< const Diagnostic > | diagnostics | ||
| ) |
The SARIF log, serialised with a trailing newline.
| nlohmann::json a11::flow::DiagnosticsToSarifValue | ( | std::string_view | source, |
| absl::Span< const Diagnostic > | diagnostics | ||
| ) |
A SARIF 2.1.0 log for one file, with rule metadata from [KnownCodes].
| nlohmann::json a11::flow::DiagnosticToJsonValue | ( | const Diagnostic & | diagnostic | ) |
One diagnostic, as it appears in the envelope.
| std::string a11::flow::DiagnosticToText | ( | std::string_view | source, |
| const Diagnostic & | diagnostic | ||
| ) |
path:line:column: severity: message [code] on one line.
An empty source omits the path prefix.
| std::string a11::flow::DtoToFlow | ( | const DtoPlan & | dto | ) |
Renders one shape as formatted Flow source.
Converts a Flow shape to JSON Schema Draft 2020-12.
Referenced shapes use $defs and $ref, including self-references. bytes, time, and duration use strings with x-a11-type metadata.
| nlohmann::json a11::flow::DtoToJsonValue | ( | const DtoPlan & | dto, |
| const Program *absl_nullable | program = nullptr |
||
| ) |
A resolved shape.
With program, referenced shapes appear under nested. A self-reference appears once, in struct.
| double a11::flow::DurationSeconds | ( | absl::Duration | value | ) |
A duration as a number of seconds, for every duration there is.
Infinite ones answer an infinity rather than failing: a timeout that never fires is a duration a flow can hold, and so is the negative one two instants subtracted the wrong way round give.
| std::string a11::flow::DurationText | ( | absl::Duration | value, |
| std::string_view | spec | ||
| ) |
A duration as text: 1m30s by default, or one unit when spec names one.
| absl::StatusOr< Value > a11::flow::Evaluate | ( | const syntax::Node & | node, |
| const EvalContext & | context | ||
| ) |
Evaluate one expression.
Fails for unsupported operations such as an unknown type or adding two instants. Other invalid values use the language defaults: incompatible comparisons use text, a missing key is null, and an unreadable number is zero.
| std::optional< std::int64_t > a11::flow::ExactInt64 | ( | const Value & | value | ) |
A tolerated stage failure, with the original item and zero-based position.
| Family a11::flow::FamilyFromName | ( | std::string_view | name | ) |
Family for a name from the output formats, or kSyntax if unknown.
| std::string_view a11::flow::FamilyName | ( | Family | family | ) |
The spelling of a family in the output formats.
| std::vector< std::string_view > a11::flow::FieldTypeNames | ( | const FieldPlan & | field | ) |
Every type named by a field, including nested container parameters.
|
inline |
Lexical source identity; normalizing it performs no target-path inspection.
|
inline |
Filesystem imports confined to explicitly approved roots without symlinks.
| const CodeInfo *absl_nullable a11::flow::FindCode | ( | std::string_view | code | ) |
The entry for a code, or nullptr if nothing publishes it.
| const Diagnostic *absl_nullable a11::flow::FirstError | ( | absl::Span< const Diagnostic > | diagnostics | ) |
The first error in diagnostics, or nullptr if none is an error.
What every strict entry point turns into its one raised failure, so that "the first thing wrong with this file" means the same in each of them.
| std::string a11::flow::FlowMarkdown | ( | const FlowPlan & | flow | ) |
A flow of the document, written out the same way: what it does, then its ports and which direction each runs.
| absl::StatusOr< actions::ActionSchema > a11::flow::FlowSchema | ( | const FlowPlan & | plan, |
| const Program *absl_nullable | shapes = nullptr |
||
| ) |
The [actions::ActionSchema] a flow presents.
A flow is an action: it has ports, headers and a name, so anything that can dispatch an action can dispatch a composition without being told it is one.
| absl::StatusOr< actions::ActionSchema > a11::flow::FlowSchema | ( | const FlowPlan & | plan, |
| const Program * | shapes | ||
| ) |
| FormatResult a11::flow::Format | ( | std::string_view | source, |
| FormatOptions | options, | ||
| CompilationLimits | limits, | ||
| CompilationBudget * | budget | ||
| ) |
| FormatResult a11::flow::Format | ( | std::string_view | source, |
| FormatOptions | options = {}, |
||
| CompilationLimits | limits = {}, |
||
| CompilationBudget *absl_nullable | budget = nullptr |
||
| ) |
Formats Flow source with stable whitespace and equivalent syntax.
Parse errors leave the source unchanged and appear in diagnostics. Formatting is idempotent; comments and literal values are preserved.
| nlohmann::json a11::flow::FormatToJsonValue | ( | const FormatResult & | result | ) |
The flow.format/v1 envelope: the formatted text, and what it took.
| std::string a11::flow::FragmentStartPattern | ( | ) |
Native document-start pattern used by host-string injectors.
| std::string a11::flow::GenerateSyntax | ( | SyntaxTarget | target | ) |
Generates the target grammar from the Flow vocabulary.
Output is deterministic and ends with a newline.
| nlohmann::json a11::flow::Handle | ( | const nlohmann::json & | request, |
| ModuleResolver | resolver = {}, |
||
| CompilationLimits | limits = {} |
||
| ) |
Handles one language service request and returns its JSON envelope.
Requests name a method and source; an optional id is echoed in the result. Invalid requests return ok: false; source problems return diagnostics. describe accepts snippet: true for a Flow body fragment.
| std::string a11::flow::HeaderBytes | ( | const syntax::Constant & | v | ) |
Encode a constant using the native action-header textual convention.
| std::vector< SemanticToken > a11::flow::Highlight | ( | absl::Span< const Token > | tokens | ) |
Classify a token stream.
The rules are the ones the grammar itself uses, which is why this reads a stream rather than one token at a time: a word is only a stage directly after a |, only a function where it is called, only a type past a port's :, and whatever follows a . is a member however it is spelled. Two of them need a look ahead rather than behind – a bare then/where is a stage only with an operand after it, and node is the keyword only where its parentheses open – and having the whole stream is what makes those cheap and exact.
The tokens are expected to include comments (LexOptions::keep_comments), and each string token is split around its escape ranges. Other tokens keep one entry each, except the final end.
| std::vector< Diagnostic > a11::flow::Inspect | ( | std::string_view | source, |
| const ParseResult & | parsed, | ||
| const ResolveResult & | resolved | ||
| ) |
Reports nonfatal Flow diagnostics from parsed and resolved source.
Findings include unused values, unwritten outputs, and ineffective stages.
| std::string a11::flow::InvocationNote | ( | std::string_view | mode | ) |
| SchemaImport a11::flow::JsonSchemaToDtos | ( | const nlohmann::json & | schema, |
| std::string_view | name | ||
| ) |
Imports shapes from schema, using name when the root has no name.
Unsupported keywords produce diagnostics alongside imported fields.
| std::string a11::flow::JsonText | ( | const Value & | value | ) |
Renders JSON with sorted keys, spaced separators, and escaped non-ASCII.
| TokenKind a11::flow::KindFromName | ( | std::string_view | name | ) |
The kind a name from [KindName] refers to, or kBad if it is not one.
| std::string_view a11::flow::KindName | ( | TokenKind | kind | ) |
The name of a kind, as a11.flow.lexer spells it.
Punctuation is named by itself ("->", "{"), which is what makes a token dump comparable between the two implementations token for token.
| absl::Span< const CodeInfo > a11::flow::KnownCodes | ( | ) |
Every diagnostic code the language can produce, sorted by code.
| LexResult a11::flow::Lex | ( | std::string_view | source, |
| LexOptions | options = {} |
||
| ) |
Lexes Flow source, ending with one end token.
Newlines delimit statements; malformed tokens produce diagnostics while lexing continues. Strict compilation checks the reported errors.
| LinkedModule a11::flow::LinkModules | ( | std::string | source, |
| std::string | identity, | ||
| const ModuleSources & | sources, | ||
| ModuleResolver | resolver, | ||
| ModuleLimits | limits, | ||
| CompilationBudget * | budget | ||
| ) |
| LinkedModule a11::flow::LinkModules | ( | std::string | source, |
| std::string | identity, | ||
| const ModuleSources & | sources = {}, |
||
| ModuleResolver | resolver = {}, |
||
| ModuleLimits | limits = {}, |
||
| CompilationBudget *absl_nullable | budget = nullptr |
||
| ) |
Link lexical imports and private dependencies using host-supplied sources.
Take key out of value: a mapping key, an index, or a field.
Answers null when it is not there, because a flow reading a field a producer did not send should be able to say if not thing.field rather than fall over.
| absl::StatusOr< actions::ActionHandler > a11::flow::MakeEntryHandler | ( | std::shared_ptr< const CompiledProgram > | program, |
| RunOptions | options = {} |
||
| ) |
The action handler that runs the program's entry flow.
A separate function rather than MakeHandler(program, ""), because the entry flow is reached by being the entry flow and not by having an empty name – the same reason Program::Entry() exists. What an interpreter calls.
| absl::StatusOr< actions::ActionHandler > a11::flow::MakeHandler | ( | std::shared_ptr< const CompiledProgram > | program, |
| std::string_view | flow, | ||
| RunOptions | options = {} |
||
| ) |
The action handler that runs one flow of program.
Registering this makes the composition an action like any other: a peer can dispatch it, another flow can call it, and a model can be offered it as a tool, without any of them knowing it is a composition.
| void a11::flow::MarkBinaryTypes | ( | std::vector< DtoPlan > & | types, |
| CompilationBudget *absl_nullable | budget = nullptr |
||
| ) |
Propagate byte payloads through the shape dependency graph.
| void a11::flow::MarkBinaryTypes | ( | std::vector< DtoPlan > & | types, |
| CompilationBudget * | budget | ||
| ) |
| Value a11::flow::MatchCompiled | ( | const pattern::Pattern & | pattern, |
| std::string_view | subject | ||
| ) |
The same, against a pattern already compiled.
What a stage uses: the pattern is written once in the source and the stream may be ten thousand values, so compiling it per value would be paying for the same scan over and over.
| absl::StatusOr< Value > a11::flow::MatchPattern | ( | std::string_view | pattern, |
| std::string_view | subject | ||
| ) |
The fields a pattern pulls out of subject, or null where it does not fit.
One implementation for both senses of match: the stage drops a value this answers null for, and the function hands the null on. A record when every hole is named, and a list when they are not – {} is read by position, so it[0] is what a positional pattern gives.
See [pattern::Compile] for the language. A pattern that does not compile is an invalid_argument naming what is wrong with it, because a pattern is a literal almost every time and a silent no-match would hide a typo in it.
| absl::Status a11::flow::MergeContract | ( | FlowPlan & | effective, |
| const FlowPlan & | other, | ||
| const Program & | program | ||
| ) |
Conjoin compatible interfaces without changing executable identity.
| absl::Span< const std::string_view > a11::flow::Methods | ( | ) |
Every method [Handle] knows, in the order --help lists them.
| std::string_view a11::flow::MethodSummary | ( | std::string_view | method | ) |
What a method takes and gives back, one line, for --help.
| std::unique_ptr< HostBridge > a11::flow::NativeHostBridge | ( | ) |
A host bridge backed by the C++ serialization registry.
| nlohmann::json a11::flow::NodeToJsonValue | ( | const syntax::Node & | node | ) |
A syntax node and its subtree.
Every node carries kind and at. Durations use {"$duration": seconds}.
| bool a11::flow::OffsetBasisFromName | ( | std::string_view | name, |
| OffsetBasis & | basis | ||
| ) |
The basis a request named, or kBytes when it named none.
false when the name is not one of the two, so a client with a typo is told rather than quietly served the wrong arithmetic.
| std::string_view a11::flow::OffsetBasisName | ( | OffsetBasis | basis | ) |
The name of a basis, for a message and for the JSON.
Where two values sit relative to one another: -1, 0 or 1.
What < and > mean in an expression, and so what | sort means: two instants or two durations compare as themselves, a number as a number, and everything else as text, so nothing dies on "3" < 5.
| ParseResult a11::flow::Parse | ( | std::string_view | source, |
| CompilationLimits | limits, | ||
| CompilationBudget * | budget | ||
| ) |
| ParseResult a11::flow::Parse | ( | std::string_view | source, |
| CompilationLimits | limits = {}, |
||
| CompilationBudget *absl_nullable | budget = nullptr |
||
| ) |
Parses Flow source into a recoverable tree and diagnostics.
Recovery skips to statement ends or inserts syntax::ErrorNode for values.
| std::optional< absl::Duration > a11::flow::ParseDuration | ( | std::string_view | text | ) |
Parse duration text, including compound units and bare seconds.
| std::optional< absl::Time > a11::flow::ParseTime | ( | std::string_view | text | ) |
Parse an instant as RFC 3339 text or a UTC calendar date.
| ParseResult a11::flow::ParseTokens | ( | std::string_view | source, |
| absl::Span< const Token > | tokens, | ||
| std::vector< Diagnostic > | diagnostics, | ||
| CompilationLimits | limits, | ||
| CompilationBudget * | budget | ||
| ) |
| ParseResult a11::flow::ParseTokens | ( | std::string_view | source, |
| absl::Span< const Token > | tokens, | ||
| std::vector< Diagnostic > | diagnostics, | ||
| CompilationLimits | limits = {}, |
||
| CompilationBudget *absl_nullable | budget = nullptr |
||
| ) |
Parse an already-lexed stream, sharing the lex diagnostics.
For a frontend that has the tokens in hand – a formatter, a highlighter that then wants a tree – so one file is lexed once. Comment tokens are stepped over here, which is what lets the same stream serve both.
| absl::StatusOr< syntax::TypeExpression > a11::flow::ParseTypeExpression | ( | std::string_view | source, |
| CompilationLimits | limits, | ||
| CompilationBudget * | budget | ||
| ) |
| absl::StatusOr< syntax::TypeExpression > a11::flow::ParseTypeExpression | ( | std::string_view | source, |
| CompilationLimits | limits = {}, |
||
| CompilationBudget *absl_nullable | budget = nullptr |
||
| ) |
Parse a standalone type with the same grammar and limits as a declaration.
| std::string a11::flow::PlanToJson | ( | std::string_view | source_name, |
| const Program & | program | ||
| ) |
The envelope, serialised with a trailing newline and two-space indent.
| nlohmann::json a11::flow::PlanToJsonValue | ( | std::string_view | source_name, |
| const Program & | program | ||
| ) |
The flow.plan/v1 envelope for resolved flows.
| std::string a11::flow::PortMarkdown | ( | std::string_view | name, |
| std::string_view | type, | ||
| bool | required, | ||
| bool | unary, | ||
| std::string_view | description | ||
| ) |
One port, written out as the Markdown a reader wants beside its name.
Used by hover and completion to show the same full port description.
| std::string_view a11::flow::ProposalKindName | ( | ProposalKind | kind | ) |
The name of a proposal kind in the output format, in kebab case.
| void a11::flow::RebaseToUtf16 | ( | nlohmann::json & | answer, |
| const TextIndex & | index | ||
| ) |
Rewrite every document offset in an answer from bytes into UTF-16 units.
The rule, and it is the whole rule: a numeric field named start, end, offset or prefix_start is a byte offset into the document, at any depth. That is true of every flow.* envelope by construction – those four names are not used for anything else in any of them – so this converts exactly the right set and needs no table of shapes to fall out of step with the emitters.
Two near matches are left unchanged. range.start and range.end are objects, and the offset inside each is the offset field this does convert. A proposal's caret counts into the text that proposal inserts, not into the document, so a document-basis conversion of it would be wrong.
| void a11::flow::RebaseToUtf16 | ( | nlohmann::json & | answer, |
| const TextIndex & | inherited, | ||
| const absl::flat_hash_map< std::string, TextIndex > & | documents | ||
| ) |
Rebase each document with its own pinned source index.
| void a11::flow::RefinePorts | ( | std::string_view | source, |
| std::vector< SemanticToken > & | semantic | ||
| ) |
Refine lexical tokens using parsed type positions and resolved bindings.
Ports include declarations, references, argument labels and called ports. Resolved locals retain identifier styling when shadowing a port or keyword. Parsing recovers from incomplete source, without reading imported files.
| Refinement a11::flow::RefinesType | ( | std::string_view | actual, |
| std::string_view | expected, | ||
| const Program & | program | ||
| ) |
Compare payload types using native aliases and document shapes.
| ResolveResult a11::flow::Resolve | ( | std::string_view | source, |
| const ParseResult & | parsed, | ||
| bool | build_graph, | ||
| const Program * | context, | ||
| CompilationLimits | limits, | ||
| CompilationBudget * | budget | ||
| ) |
| ResolveResult a11::flow::Resolve | ( | std::string_view | source, |
| const ParseResult & | parsed, | ||
| bool | build_graph = false, |
||
| const Program *absl_nullable | context = nullptr, |
||
| CompilationLimits | limits = {}, |
||
| CompilationBudget *absl_nullable | budget = nullptr |
||
| ) |
Resolves names, ports, scopes, node maps, and types in a parsed program.
Returns partial results and diagnostics for invalid source. build_graph adds executable graphs that borrow from parsed.
| absl::Duration a11::flow::SecondsDuration | ( | double | total | ) |
A duration of total seconds, including negative and infinite values.
| absl::StatusOr< PipelinePorts > a11::flow::SelectPipelinePorts | ( | const FlowPlan & | flow, |
| absl::Span< const std::string > | supplied | ||
| ) |
| absl::StatusOr< const PortPlan * > a11::flow::SelectPipelineStarterOutput | ( | const FlowPlan & | flow, |
| absl::Span< const std::string > | supplied | ||
| ) |
The unique output of a call with every input supplied explicitly.
| SemanticKind a11::flow::SemanticKindFromName | ( | std::string_view | name | ) |
The kind a name refers to, or kIdentifier if it is not one.
| std::string_view a11::flow::SemanticKindName | ( | SemanticKind | kind | ) |
The name of a semantic kind in the output formats, in kebab case.
| Severity a11::flow::SeverityFromName | ( | std::string_view | name | ) |
Severity for a name from the output formats, or kError if unknown.
| std::string_view a11::flow::SeverityName | ( | Severity | severity | ) |
The spelling of a severity in the output formats.
| std::string a11::flow::ShapeMarkdown | ( | const DtoPlan & | shape | ) |
A struct, written out the same way: how many fields, then each of them.
| nlohmann::json a11::flow::SingleItemsToJson | ( | const graph::FlowGraph & | flow, |
| const SingleItemAnalysis & | analysis, | ||
| bool | enabled | ||
| ) |
Explain transport decisions without changing the public source plan.
| void a11::flow::SortDiagnostics | ( | std::vector< Diagnostic > & | diagnostics | ) |
Sorts diagnostics into the order every frontend presents them in: by position, then by code, so two runs over the same file agree byte for byte.
| std::string a11::flow::StageMarkdown | ( | std::string_view | name | ) |
A pipeline stage, written out as reference.
Uses the stage role when a word also has a built-in function meaning.
| std::optional< absl::StatusCode > a11::flow::StatusCodeOf | ( | const Value & | value | ) |
The canonical code value names, by name or by number, or nullopt.
Either case of a canonical name, and any number Abseil defines a code for, which is what lets a flow re-raise a status it was handed without knowing how it was spelled.
| absl::Status a11::flow::StatusOfRecord | ( | const Value & | record | ) |
The status a record like the one above describes.
| Value a11::flow::StatusRecord | ( | const absl::Status & | status | ) |
A status as the record a flow sees when it looks at an outcome.
{"ok": .., "code": "NOT_FOUND", "number": 5, "message": ..} – data, so a flow can branch on it, put it on an output, or raise it again, without any of the language knowing what a status is.
format with each % conversion replaced by one of arguments.
printf's syntax, because a format string is a thing people already know how to read, and because it is only a format string: no attribute access, no indexing, nothing a template can reach through. A flow's templates can come from a model, so that matters more here than the convenience of a richer template language would.
%(SPEC)s applies a spec to the value first – a duration unit, a strftime pattern, epoch – and a conversion with no value behind it is left as it was written, because a visible %3$s in the output is easier to diagnose than a flow that died formatting a log line.
| std::string a11::flow::StrformatCompiled | ( | const FormatTemplate & | parts, |
| absl::Span< const Value > | arguments | ||
| ) |
| std::string_view a11::flow::SymbolClassName | ( | SymbolClass | kind | ) |
| std::string_view a11::flow::SymbolKindName | ( | SymbolKind | kind | ) |
The name of a symbol kind, for a message and for the JSON.
| std::vector< DocumentSymbol > a11::flow::Symbols | ( | std::string_view | source, |
| CompilationLimits | limits, | ||
| CompilationBudget * | budget | ||
| ) |
| std::vector< DocumentSymbol > a11::flow::Symbols | ( | std::string_view | source, |
| CompilationLimits | limits = {}, |
||
| CompilationBudget *absl_nullable | budget = nullptr |
||
| ) |
Every symbol a document declares, nested as it is written.
Top-level flows and shapes contain their ports, fields, and local bindings.
| bool a11::flow::SyntaxTargetFromName | ( | std::string_view | name, |
| SyntaxTarget & | target | ||
| ) |
A target from its name, or nullopt.
| std::string_view a11::flow::SyntaxTargetName | ( | SyntaxTarget | target | ) |
The name a target is asked for by: sublime.
| std::string_view a11::flow::SyntaxTargetPath | ( | SyntaxTarget | target | ) |
Where the generated file belongs, relative to the repository root.
| absl::Span< const SyntaxTarget > a11::flow::SyntaxTargets | ( | ) |
Every target, for a command that offers a choice of them.
| std::string a11::flow::SyntaxToJson | ( | std::string_view | source, |
| const ParseResult & | result | ||
| ) |
The envelope, serialised with a trailing newline and two-space indent.
| nlohmann::json a11::flow::SyntaxToJsonValue | ( | std::string_view | source, |
| const ParseResult & | result | ||
| ) |
The flow.syntax/v1 envelope, including partial trees and diagnostics.
| std::string a11::flow::TimeText | ( | absl::Time | value, |
| std::string_view | spec | ||
| ) |
An instant as text: RFC 3339 in UTC, a strftime pattern, or epoch.
| std::string a11::flow::TokensToJson | ( | std::string_view | source_name, |
| std::string_view | source | ||
| ) |
The envelope, serialised with a trailing newline and two-space indent.
| nlohmann::json a11::flow::TokensToJsonValue | ( | std::string_view | source_name, |
| std::string_view | source | ||
| ) |
The flow.tokens/v1 envelope, with token kinds and semantic classes.
Token offsets cover the source; unclassified spans are whitespace.
The first size of a value: characters, bytes, elements or pairs.
| bool a11::flow::Truthy | ( | const Value & | value | ) |
Whether value counts as true, as an if and a where decide it.
| nlohmann::json a11::flow::VocabularyToJsonValue | ( | ) |
The language word sets as flow.vocabulary/v1.
Expands a symbol range to include its selection.
| std::string a11::flow::WordMarkdown | ( | std::string_view | name, |
| vocabulary::WordRole | role | ||
| ) |
One word or mark of the language, written out as reference: what it does, what it takes, how it behaves, and a line of Flow using it.
Empty where nothing documents the name. role says which position the name was read in, since a word can mean two things; where that role's table has no entry the other tables are asked, because a word set may list a word that a neighbouring set documents (vocabulary::AnyDocumentation).
The name may be written in either case, as the language allows: TRUNCATE is documented and shown as written.
|
inlineconstexpr |
|
inlineconstexpr |
The format field of the completions envelope.
|
inlineconstexpr |
The format field of the definition envelope.
|
inlineconstexpr |
Envelope format identifiers. Readers ignore unknown fields in a version.
|
inlineconstexpr |
Extension key preserving a shape's field declaration order.
|
inlineconstexpr |
The extension key that says which Flow type a string really is.
|
inlineconstexpr |
|
inlineconstexpr |
The format field of the hover envelope.
|
inlineconstexpr |
The format field of the plan envelope.
|
inlineconstexpr |
Maximum values a pipe may hold ahead of its reader.
|
inlineconstexpr |
The format field of the schema envelope.
|
inlineconstexpr |
The format field of the symbols envelope.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |