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

The type of a port, or of a value being made one: string, list[a11.NodeFragment], "audio/wav". More...

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

Public Member Functions

std::string ToString () const
 The type as it would be written, which is what a message quotes.
 

Public Attributes

Location location = {}
 
std::string name
 
std::vector< TypeExpression > parameters = {}
 
bool quoted = false
 
bool sugared = false
 Whether a list[T] was written T[].
 

Detailed Description

The type of a port, or of a value being made one: string, list[a11.NodeFragment], "audio/wav".

Not a [Node]: a type never stands where an expression does, and keeping it a value type is what lets a port declaration and a cast hold one directly. name is what was written before the brackets – a built-in name, a dotted serialisation tag, or a mimetype when quoted – and parameters are the types a generic one was given.

Member Function Documentation

◆ ToString()

std::string a11::flow::syntax::TypeExpression::ToString ( ) const

The type as it would be written, which is what a message quotes.

Member Data Documentation

◆ location

Location a11::flow::syntax::TypeExpression::location = {}

◆ name

std::string a11::flow::syntax::TypeExpression::name

◆ parameters

std::vector<TypeExpression> a11::flow::syntax::TypeExpression::parameters = {}

◆ quoted

bool a11::flow::syntax::TypeExpression::quoted = false

◆ sugared

bool a11::flow::syntax::TypeExpression::sugared = false

Whether a list[T] was written T[].

The two are the same type and everything but the formatter treats them as one; this is only so a document formatted twice reads the way its author wrote it.


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