コード例 #1
0
ファイル: expr-id.cpp プロジェクト: NoraAl/banjo
// Returns a reference to a single function. The type of the expression is 
// a reference to the function type.
static Expr&
make_function_ref(Context& cxt, Function_decl& d)
{
  Type& t = make_reference_type(cxt, d.type());
  return cxt.make_function_reference(t, d);
}
コード例 #2
0
ファイル: expr-id.cpp プロジェクト: NoraAl/banjo
// Returns an expression referring to a class method.
static Expr&
make_method_ref(Context& cxt, Expr& e, Method_decl& d)
{
  Type& t = make_reference_type(cxt, d.type());
  return cxt.make_method_reference(t, e, d);
}
コード例 #3
0
ファイル: expr-id.cpp プロジェクト: NoraAl/banjo
// Returns a reference to the declared object. The type of the
// expression is a reference to the declared type of the object.
static Expr&
make_object_ref(Context& cxt, Object_decl& d)
{
  Type& t = make_reference_type(cxt, d.type());
  return cxt.make_object_reference(t, d);
}
コード例 #4
0
ファイル: sema-type.cpp プロジェクト: asutton/banjo
Type&
Parser::on_reference_type(Type& t)
{
  return make_reference_type(cxt, t);
}