Logo Fabulous.AST

ObjExprBuilders Module

Type extensions

Type extension Description

Ast.ObjExpr(name)

Full Usage: Ast.ObjExpr(name)

Parameters:
Returns: CollectionBuilder<Expr, BindingNode>

Create an object expression ({ new T with ... }). The body takes the members of T and, after them, InterfaceWith(...) blocks for any extra interfaces. Fantomas lays out an object expression with no members of its own and only extra interfaces in a way the compiler rejects, so give it at least one member, or use the interface itself as T.

Extended Type: Ast

name : WidgetBuilder<Type>

The type to create an instance of.

Returns: CollectionBuilder<Expr, BindingNode>

Ast.ObjExpr(name)

Full Usage: Ast.ObjExpr(name)

Parameters:
    name : string - The type to create an instance of.

Returns: CollectionBuilder<Expr, BindingNode>

Create an object expression ({ new T with ... }) for the named type.

Extended Type: Ast

name : string

The type to create an instance of.

Returns: CollectionBuilder<Expr, BindingNode>

Ast.ObjExpr(name, expr)

Full Usage: Ast.ObjExpr(name, expr)

Parameters:
Returns: CollectionBuilder<Expr, BindingNode>

Create an object expression that calls a base class constructor ({ new T(args) with ... }).

Extended Type: Ast

name : WidgetBuilder<Type>

The base class.

expr : WidgetBuilder<Expr>

The constructor arguments, such as ConstantExpr(ConstantUnit()).

Returns: CollectionBuilder<Expr, BindingNode>

Ast.ObjExpr(name, expr)

Full Usage: Ast.ObjExpr(name, expr)

Parameters:
    name : string - The base class.
    expr : string - The constructor arguments.

Returns: CollectionBuilder<Expr, BindingNode>

Create an object expression that calls a base class constructor ({ new T(args) with ... }).

Extended Type: Ast

name : string

The base class.

expr : string

The constructor arguments.

Returns: CollectionBuilder<Expr, BindingNode>

Type something to start searching.