|
A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
|
A value the language can write out in full: what a literal is, and what folding a literal expression gives. More...
#include <cpp/a11/flow/syntax.h>
Public Types | |
| enum class | Kind { kNull , kBool , kInteger , kDouble , kString , kDuration , kList , kObject } |
Public Member Functions | |
| double | AsDouble () const |
| The number this holds, whichever way it was written. | |
Static Public Member Functions | |
| static Constant | Null () |
| static Constant | Bool (bool value) |
| static Constant | Integer (long long value) |
| static Constant | Double (double value) |
| static Constant | String (std::string value) |
| static Constant | Duration (absl::Duration value) |
Public Attributes | |
| Kind | kind = Kind::kNull |
| bool | boolean = false |
| long long | integer = 0 |
| double | number = 0.0 |
| std::string | text |
| absl::Duration | duration |
| std::vector< Constant > | items |
| std::vector< std::pair< std::string, Constant > > | pairs |
A value the language can write out in full: what a literal is, and what folding a literal expression gives.
Recursive, because a list of objects of lists is a constant like any other. kInteger is kept apart from kDouble for the reason the grammar cares about: a count of values has to be a whole number of them.
|
strong |
| double a11::flow::syntax::Constant::AsDouble | ( | ) | const |
The number this holds, whichever way it was written.
|
static |
|
static |
|
static |
|
static |
|
inlinestatic |
|
static |
| bool a11::flow::syntax::Constant::boolean = false |
| absl::Duration a11::flow::syntax::Constant::duration |
| long long a11::flow::syntax::Constant::integer = 0 |
| std::vector<Constant> a11::flow::syntax::Constant::items |
| Kind a11::flow::syntax::Constant::kind = Kind::kNull |
| double a11::flow::syntax::Constant::number = 0.0 |
| std::vector<std::pair<std::string, Constant> > a11::flow::syntax::Constant::pairs |
| std::string a11::flow::syntax::Constant::text |