Beispiel #1
0
// Direct initialzie `d` by a brace-enclosed list of expressions
// `es`.
Expr&
Parser::on_brace_initialization(Decl& d, Expr_list& es)
{
  Expr& i = list_initialize(cxt, declared_type(d), es);
  initialize_declaration(d, i);
  return i;
}
Beispiel #2
0
// Copy initialize the declaration `d` with `e`.
Expr&
Parser::on_equal_initialization(Decl& d, Expr& e)
{
  Expr& i = copy_initialize(cxt, declared_type(d), e);
  initialize_declaration(d, i);
  return i;
}
Beispiel #3
0
// Select a default initializer for `d`.
//
// FIXME: This relies on the construction of placeholder nodes
// in the initialization branch. That seems wrong. We should be
// able to convey syntax via flags.
Expr&
Parser::on_default_initialization(Decl& d)
{
  Type& t = declared_type(d);
  Expr& i = default_initialize(cxt, t);
  initialize_declaration(d, i);
  return i;
}
Beispiel #4
0
void initialize_kernel_module() {
    initialize_level();
    initialize_expr();
    initialize_declaration();
    initialize_type_checker();
    initialize_environment();
    initialize_formatter();
}